我正在尝试在 Armbian Focal (Ubuntu 20.04) 或 Buster (Debian 10) 上安装 .Net 5 运行时,在 Orange Pi Zero 上运行。
所以我在这里按照微软的指示:
https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu
但在最后一步:
sudo apt-get install -y aspnetcore-runtime-5.0
我收到此错误:
E: Unable to locate package aspnetcore-runtime-5.0
E: Couldn't find any package by glob 'aspnetcore-runtime-5.0'
E: Couldn't find any package by regex 'aspnetcore-runtime-5.0'
然后我按照微软的建议从这里手动安装它:
https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#apt-troubleshooting
但在最后一步,我又得到了同样的错误。有任何想法吗?
总之,这些是我首先尝试的步骤:
wget https://packages.microsoft.com/config/ubuntu/20.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-5.0
这些是我在上述失败时尝试的步骤:
sudo dpkg --purge packages-microsoft-prod && sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
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/{os-version}/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 update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-5.0
编辑:
我之前在完全相同的设置上安装了 .Net Core 3.1 运行时,没有任何问题。我不确定 .Net 5 中是否有一些不同的东西不允许我安装它