我目前正在尝试按照这些说明在 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.
Run Code Online (Sandbox Code Playgroud)
我找到了一些关于这个问题的帖子,但没有帮助。我希望在这里得到一些正确的信息。
小智 6
首先添加来源:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
Run Code Online (Sandbox Code Playgroud)
在那之后:
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1.200
Run Code Online (Sandbox Code Playgroud)
sudo apt-get update很重要
来源:https : //www.microsoft.com/net/learn/get-started/linux/ubuntu18-04
归档时间: |
|
查看次数: |
3712 次 |
最近记录: |