我目前正在尝试按照这些说明在 Ubuntu 18.04 上安装 .NET Core。但我总是收到以下消息:
me@mine-Ubuntu:~$ sudo apt-get install -y dotnet-sdk-2.1.200
[sudo] password for me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
dotnet-sdk-2.1.200 : Depends: dotnet-runtime-2.0.7 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我发现了一些关于这个问题的帖子,但没有帮助。我希望在这里得到一些适当的信息。
首先添加来源:
在那之后:
sudo apt-get update很重要
来源:https ://www.microsoft.com/net/learn/get-started/linux/ubuntu18-04
安装后
libicu55
,您需要安装其他不会自行安装的包依赖项:然后
sudo apt=get install dotnet-sdk-2.x
注册 Microsoft 密钥和提要
在安装 .NET 之前,您需要注册 Microsoft 密钥、注册产品存储库并安装所需的依赖项。每台机器只需执行一次。
打开终端并运行以下命令:
安装 .NET SDK
更新可供安装的产品,然后安装 .NET SDK。
在您的终端中,运行以下命令:
来源 - https://www.microsoft.com/net/download/linux-package-manager/rhel/sdk-current
你需要安装libicu55:
然后安装网络核心: