Skip to content

cannot install dotnet-sdk-2.1 on ubuntu (404 not found) #3010

Closed
@kimbaudi

Description

@kimbaudi

cannot install dotnet-sdk-2.1 on ubuntu (404 not found)

TLDR;

sudo apt install dotnet-sdk-2.1 is causing the following error:

E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-sdk-2.1/dotnet-sdk-2.1.701-x64.deb  404  Not Found [IP: 13.91.48.226 443]

Detail of problem

This morning I updated my Ubuntu 18.04 machine (sudo apt -y upgrade) and received the following error:

Err:1 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 dotnet-runtime-deps-2.1 amd64 2.1.12-1
  404  Not Found [IP: 13.91.48.226 443]
Err:2 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 dotnet-hostfxr-2.1 amd64 2.1.12-1
  404  Not Found [IP: 13.91.48.226 443]
Err:3 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 dotnet-runtime-2.1 amd64 2.1.12-1
  404  Not Found [IP: 13.91.48.226 443]
Err:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 aspnetcore-runtime-2.1 amd64 2.1.12-1
  404  Not Found [IP: 13.91.48.226 443]
Err:5 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 dotnet-sdk-2.1 amd64 2.1.701-1
  404  Not Found [IP: 13.91.48.226 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-runtime-deps-2.1/dotnet-runtime-deps-2.1.12-x64.deb  404  Not Found [IP: 13.91.48.226 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-hostfxr-2.1/dotnet-hostfxr-2.1.12-x64.deb  404  Not Found [IP: 13.91.48.226 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-runtime-2.1/dotnet-runtime-2.1.12-x64.deb  404  Not Found [IP: 13.91.48.226 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/a/aspnetcore-runtime-2.1/aspnetcore-runtime-2.1.12-x64.deb  404  Not Found [IP: 13.91.48.226 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-sdk-2.1/dotnet-sdk-2.1.701-x64.deb  404  Not Found [IP: 13.91.48.226 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

So I uninstalled dotnet and reinstalled dotnet:

# uninstall script
curl -OL https://github.com/raw/dotnet/cli/master/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh
chmod u+x dotnet-uninstall-debian-packages.sh
sudo ./dotnet-uninstall-debian-packages.sh

# remove remaining folders
sudo rm -rf /usr/share/dotnet
sudo rm -rf ~/.dotnet

# uninstall package including config file
dpkg -P packages-microsoft-prod
sudo apt update

I then attempted to reinstall dotnet

wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo add-apt-repository universe
sudo apt-get install apt-transport-https
sudo apt update
sudo apt install dotnet-sdk-2.2
sudo apt install dotnet-sdk-2.1

However, sudo apt install dotnet-sdk-2.1 gives me the same error as when I first performed sudo apt -y upgrade this morning (which was the reason why I uninstalled and reinstalled dotnet).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions