我有一个小问题,我最近把我的电脑更新到了ubuntu 20.04,我在从https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1910#troubleshoot-包管理器,当我到达sudo apt-get install dotnet-sdk-3.1
时,它会给我这个:
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-3.1 : Depends: dotnet-runtime-3.1 (>= 3.1.3) but it is not going to be installed
Depends: aspnetcore-runtime-3.1 (>= 3.1.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我之前使用的是popos19.10,但安装dotnetsdk不是问题,所以对于linux用户来说,有什么帮助吗?
我在这个Github主题的末尾找到了一个解决方案。然后我使用命令:
sudo apt-get install -y gpg
wget O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget https://packages.microsoft.com/config/ubuntu/19.10/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get install -y apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-3.1
https://github.com/dotnet/docs/issues/17638
在此处输入图像描述