While running the Microsoft SharePoint 2013 Products Prepartion Tool (also known as Prerequisites Installer or prerequisiteinstaller.exe) on a Windows Server 2012 R2 machine the following error message appeared:
There was an error during installation.
The tool was unable to install Application Server Role, Web Server (IIS) Role.
This error appeared because the Prerequisites Installer was trying to install the .NET Framework 3.5 feature, but Windows Server 2012 R2 couldn’t find the required binaries. This is a known error and may be solved by moving over to the Server Manager, clicking through the feature installation and specifying an alternate source path as described here:
SharePoint 2016: Unable to install Application Server Role, Web Server (IIS) Role
SharePoint 2013: Unable to install Application, Web Server (IIS) Role