gpt4 book ai didi

linux - 我在 linux ubuntu 20.04 上安装 dotnet sdk 时遇到问题

转载 作者:行者123 更新时间:2023-12-04 18:39:38 24 4
gpt4 key购买 nike

我有一个小问题我最近将我的电脑更新到了 ubuntu 20.04,我在从 https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1910#troubleshoot-the-package-manager 安装 dotnet-sdk 的东西时遇到了问题当我到达 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.

我之前使用的是 pop os 19.10,但安装 dotnet sdk 不是问题,所以对于 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

enter image description here

关于linux - 我在 linux ubuntu 20.04 上安装 dotnet sdk 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61400638/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com