系统相关
首页 > 系统相关> > linux – 如何在Debian Jessie中安装dotnet core sdk

linux – 如何在Debian Jessie中安装dotnet core sdk

作者:互联网

我在Debian Jessie Box上安装Dotnet Core SDK时遇到问题.这是我遵循https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x的指南.

注册产品密钥和Feed后我得到的是在尝试执行apt-get install dotnet-sdk-2.0.0或dotnet-sdk-2.0.2时无法找到Package.我目前以root身份登录,因为这是我的本地开发机器.

重现步骤:

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg   
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg  
sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-jessie-prod jessie main" > /etc/apt/sources.list.d/dotnetdev.list'  
apt-get update  
apt-get install dotnet-sdk-2.0.0

06001

我哪里错了?由于某种原因,它就像apt无法看到微软的回购.
我意识到我可以从下载的tarball中安装它,如果有必要我会这样做,但我更喜欢使用软件包管理器来方便维护.

这是apt-get update的输出

06002

解决方法:

经过几天的斗争,我决定将我的盒子升级到Debian Stretch.
这是我跟随https://linuxconfig.org/how-to-upgrade-debian-8-jessie-to-debian-9-stretch的文章

apt-get update
apt-get upgrade
apt-get dist-upgrade

更改了我的sources.list

FROM JESSIE  
deb http://httpredir.debian.org/debian jessie main  
deb http://httpredir.debian.org/debian jessie-updates main  
deb http://security.debian.org jessie/updates main  
TO STRETCH  
deb http://httpredir.debian.org/debian stretch main  
deb http://httpredir.debian.org/debian stretch-updates main  
deb http://security.debian.org stretch/updates main  

再来一次

apt-get update
apt-get upgrade
apt-get dist-upgrade

升级完成后,我终于可以看到我正在寻找的dotnet核心包!

标签:linux,debian,net-core,debian-jessie
来源: https://codeday.me/bug/20190627/1305579.html