无法在 Windows Server 2012 R2 Core 上安装 .NET Framework 4.6

无法在 Windows Server 2012 R2 Core 上安装 .NET Framework 4.6

使用离线安装程序时(https://www.microsoft.com/en-us/download/details.aspx?id=48137) 在 Windows Server 2012 R2 Core 计算机上安装 .NET 4.6 时返回以下错误:

Problem signature:
Problem Event Name: VSSetup
Problem Signature 01:   Microsoft .NET Framework 4.6 Setup
Problem Signature 02:   4.6.00081
Problem Signature 03:   14.0.81.0
Problem Signature 04:   1
Problem Signature 05:   unknown
Problem Signature 06:   None_UI_Interactive_Crash
Problem Signature 07:   0xc000008c
Problem Signature 08:   0
Problem Signature 09:   unknown
OS Version: 6.3.9600.2.0.0.272.7
Locale ID:  1033

我也尝试使用 chocolatey 安装 .NET 4.6。生成的日志中输出以下错误:

[11/3/2015, 10:26:0]Launching Download and Install operations simultaneously.
[11/3/2015, 10:26:0] Action: Downloading and/or Verifying Items
[11/3/2015, 10:26:0]All buttons hidden in passive mode
[11/3/2015, 10:26:0]Verifying Digital Signatures: C:\9cc6764dbba6d31323a799ae35\SetupUtility.exe
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 1
[11/3/2015, 10:26:0] C:\9cc6764dbba6d31323a799ae35\SetupUtility.exe: Verifying signature for SetupUtility.exe
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 2
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 3
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 4
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 5
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 6
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 7
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 8
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 9
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 10

我可以在 Windows Server 2012 R2 的完整(GUI)版本上成功安装 .NET 4.6。

更新:删除 windows 功能后用户接口基础设施从 Full Win Server 2012 R2 实例中,产生了与 Core 实例上发生的相同的错误。

这两台服务器都作为 AWS 实例运行,并使用亚马逊自己的 AMI。

答案1

.NET 4.6 和 4.6.1 安装程序都尝试使用 Server Core 上不可用的 GUI 功能并崩溃。即使在被动模式下也会发生这种情况。幸运的是,完全安静的安装可以正常工作:

NDP46-KB3045557-x86-x64-AllOS-ENU.exe /q

或者

NDP461-KB3102436-x86-x64-AllOS-ENU.exe /q

/norestart如果不想让服务器自动重启请添加)

答案2

我的解决方案如下:

  1. 手动提取 [脱机安装程序| 中的所有文件https://www.microsoft.com/en-us/download/details.aspx?id=48137]使用7zip
  2. 运行dism.exe添加适合Win Server 2012 Core 64-Bit的包。

这是我使用的脚本。笔记该脚本会安装适用于 Windows Server 2012 64 位的相应软件包,但尚未在 Win RT 或 32 位系统上进行测试:

# Installs the .Net 4.6 onto Windows Server 2012 Core instances.
# Running the exe causes an error due to the User-Interfaces-Infra feature not being installed
$ErrorAction = "Stop"

# Download URL has been pulled from the Chocolatey DotNet4.6 install script
$downloadUrl = "http://download.microsoft.com/download/C/3/A/C3A5200B-D33C-47E9-9D70-2F7C65DAAD94/NDP46-KB3045557-x86-x64-AllOS-ENU.exe"
$fileDestination = "c:\dotnet46.exe"
$extractDir = "c:\dotnet46"

(New-Object net.webclient).DownloadFile($downloadUrl, $fileDestination)

& 7z.exe e -y -o"$extractDir" "$fileDestination"

dism.exe /online /norestart /add-package /PackagePath:$extractDir\x64-Windows8.1-KB3045563-x64.cab

答案3

看起来安装失败是因为原始安装有问题。这很奇怪。

我将尝试重新安装 .NET 4.6(或运行修复),然后尝试卸载它。

相关内容