APT - Невозможно найти пакет (aspnetcore/dotnet runtime, Ubuntu)

APT - Невозможно найти пакет (aspnetcore/dotnet runtime, Ubuntu)

Я пытаюсь установить пакет aspnetcore-runtime-3.1, я добавил ключ подписи пакета Microsoft с помощью

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

Однако sudo apt install aspnetcore-runtime-3.1выдает ошибку:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package aspnetcore-runtime-3.1

Поиск пакета с помощью apt search показывает, что пакет существует:

$ sudo apt search aspnetcore
Sorting... Done
Full Text Search... Done
aspnetcore-runtime-2.1/focal 2.1.20-1 amd64
  Microsoft ASP.NET Core 2.1.20 Shared Framework

aspnetcore-runtime-3.1/focal 3.1.6-1 amd64
  Shared Framework for hosting of Microsoft ASP.NET Core applications. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/aspnet/AspNetCore). We happily accept issues and PRs.

aspnetcore-targeting-pack-3.1/focal 3.1.3-1 amd64
  Shared Framework for hosting of Microsoft ASP.NET Core applications. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/aspnet/AspNetCore). We happily accept issues and PRs

Я попробовал действия по устранению неполадок, перечисленные надокументы Microsoft:

sudo dpkg --purge packages-microsoft-prod && sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install aspnetcore-runtime-3.1

и

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/20.04/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-3.1

Оба выдают одну и ту же ошибку. Я особенно сбит с толку, поскольку пакет, очевидно, доступен, поскольку отображается в apt search?

решение1

В соответствии сдокументация:

:~# cd $HOME
:~# wget https://download.visualstudio.microsoft.com/download/pr/dffd493f-9eb8-483f-81c7-a9e2201574ef/54e7464241e01e7031fd89e6fe88e6da/aspnetcore-runtime-3.1.9-linux-arm64.tar.gz

:~# mkdir -p $HOME/dotnet && tar zxf dotnet.tar.gz -C $HOME/dotnet
:~# export PATH=$PATH:$HOME/dotnet

:~# dotnet --info
  It was not possible to find any installed .NET Core SDKs
  Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
      https://aka.ms/dotnet-download

Host (useful for support):
  Version: 3.1.9
  Commit:  774fc3d6a9

.NET Core SDKs installed:
  No SDKs were found.

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.9 [/root/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.9 [/root/dotnet/shared/Microsoft.NETCore.App]

Связанный контент