Core: Problem installing .NET Core 2.1 on Ubuntu 18.04 (missing file in the repo)

Created on 4 Jun 2018  路  8Comments  路  Source: dotnet/core

When I'm trying to install .NET Core for the first time on almost fresh Ubuntu 18.04 (clean install, no upgrade from older version, installed all updates till today and some extra software from standart repositories) it will not succeed because of an HTTP 404 error for missing deb files.

Here is the output:

# apt-get install aspnetcore-runtime-2.1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dotnet-host dotnet-hostfxr-2.1 dotnet-runtime-2.1 dotnet-runtime-deps-2.1 dotnet-runtime-deps-2.1.0-rc1 liblttng-ust-ctl4 liblttng-ust0 liburcu6
The following NEW packages will be installed:
  aspnetcore-runtime-2.1 dotnet-host dotnet-hostfxr-2.1 dotnet-runtime-2.1 dotnet-runtime-deps-2.1 dotnet-runtime-deps-2.1.0-rc1 liblttng-ust-ctl4 liblttng-ust0 liburcu6
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 42,9 MB of archives.
After this operation, 146 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://bg.archive.ubuntu.com/ubuntu bionic/main amd64 liburcu6 amd64 0.10.1-1 [52,1 kB]
Get:2 http://bg.archive.ubuntu.com/ubuntu bionic/universe amd64 liblttng-ust-ctl4 amd64 2.10.1-1 [80,8 kB]
Get:3 http://bg.archive.ubuntu.com/ubuntu bionic/universe amd64 liblttng-ust0 amd64 2.10.1-1 [154 kB]
Get:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 dotnet-runtime-deps-2.1 amd64 2.1.0-1 [2592 B]
Err:5 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 dotnet-runtime-deps-2.1.0-rc1 amd64 2.1.0-rc1-1
  404  Not Found [IP: 13.80.10.205 443]
Err:6 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 dotnet-host amd64 2.1.0-rc1-1
  404  Not Found [IP: 13.80.10.205 443]
Get:7 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 dotnet-hostfxr-2.1 amd64 2.1.0-1 [143 kB]
Get:8 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 dotnet-runtime-2.1 amd64 2.1.0-1 [20,3 MB]
Get:9 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 aspnetcore-runtime-2.1 amd64 2.1.0-1 [22,1 MB]
Fetched 42,9 MB in 9s (4653 kB/s)                                                                                                                                                                           
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-runtime-deps-2.1.0-rc1/dotnet-runtime-deps-2.1.0-rc1-ubuntu.18.04-x64.deb  404  Not Found [IP: 13.80.10.205 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-host/dotnet-host-2.1.0-rc1-x64.deb  404  Not Found [IP: 13.80.10.205 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Most helpful comment

I have the problem too.
Centos7
Dependencies Resolved

===================================================================

Package Arch Version Repository Size

Installing:
dotnet-sdk-2.1 x86_64 2.1.300-1 packages-microsoft-com-prod 109 M
Installing for dependencies:
aspnetcore-runtime-2.1 x86_64 2.1.0-1 packages-microsoft-com-prod 29 M
dotnet-host x86_64 2.1.0_rc1-1 packages-microsoft-com-prod 43 k
dotnet-hostfxr-2.1 x86_64 2.1.0-1 packages-microsoft-com-prod 195 k
dotnet-runtime-2.1 x86_64 2.1.0-1 packages-microsoft-com-prod 27 M
dotnet-runtime-deps-2.1 x86_64 2.1.0-1 packages-microsoft-com-prod 2.8 k
dotnet-runtime-deps-2.1.0-rc1 x86_64 2.1.0_rc1-1 packages-microsoft-com-prod 2.8 k
libicu x86_64 50.1.2-15.el7 base 6.9 M

Transaction Summary

Install 1 Package (+7 Dependent packages)

Total size: 172 M
Total download size: 45 k
Installed size: 384 M
Is this ok [y/d/N]: y
Downloading packages:
dotnet-host-2.1.0-rc1-x64.rpm FAILED
https://packages.microsoft.com/rhel/7/prod/dotnet-host-2.1.0-rc1-x64.rpm: [Errno 14] HTTPS Error 404 - Not Found ] 0.0 B/s | 0 B --:--:-- ETA
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

dotnet-runtime-deps-2.1.0-rc1- FAILED
https://packages.microsoft.com/rhel/7/prod/dotnet-runtime-deps-2.1.0-rc1-rhel.7-x64.rpm: [Errno 14] HTTPS Error 404 - Not Found ] 0.0 B/s | 0 B --:--:-- ETA
Trying other mirror.

Error downloading packages:
dotnet-host-2.1.0_rc1-1.x86_64: [Errno 256] No more mirrors to try.
dotnet-runtime-deps-2.1.0-rc1-2.1.0_rc1-1.x86_64: [Errno 256] No more mirrors to try.

All 8 comments

I have the problem too.
Centos7
Dependencies Resolved

===================================================================

Package Arch Version Repository Size

Installing:
dotnet-sdk-2.1 x86_64 2.1.300-1 packages-microsoft-com-prod 109 M
Installing for dependencies:
aspnetcore-runtime-2.1 x86_64 2.1.0-1 packages-microsoft-com-prod 29 M
dotnet-host x86_64 2.1.0_rc1-1 packages-microsoft-com-prod 43 k
dotnet-hostfxr-2.1 x86_64 2.1.0-1 packages-microsoft-com-prod 195 k
dotnet-runtime-2.1 x86_64 2.1.0-1 packages-microsoft-com-prod 27 M
dotnet-runtime-deps-2.1 x86_64 2.1.0-1 packages-microsoft-com-prod 2.8 k
dotnet-runtime-deps-2.1.0-rc1 x86_64 2.1.0_rc1-1 packages-microsoft-com-prod 2.8 k
libicu x86_64 50.1.2-15.el7 base 6.9 M

Transaction Summary

Install 1 Package (+7 Dependent packages)

Total size: 172 M
Total download size: 45 k
Installed size: 384 M
Is this ok [y/d/N]: y
Downloading packages:
dotnet-host-2.1.0-rc1-x64.rpm FAILED
https://packages.microsoft.com/rhel/7/prod/dotnet-host-2.1.0-rc1-x64.rpm: [Errno 14] HTTPS Error 404 - Not Found ] 0.0 B/s | 0 B --:--:-- ETA
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

dotnet-runtime-deps-2.1.0-rc1- FAILED
https://packages.microsoft.com/rhel/7/prod/dotnet-runtime-deps-2.1.0-rc1-rhel.7-x64.rpm: [Errno 14] HTTPS Error 404 - Not Found ] 0.0 B/s | 0 B --:--:-- ETA
Trying other mirror.

Error downloading packages:
dotnet-host-2.1.0_rc1-1.x86_64: [Errno 256] No more mirrors to try.
dotnet-runtime-deps-2.1.0-rc1-2.1.0_rc1-1.x86_64: [Errno 256] No more mirrors to try.

the same issue,Centos7

It also broke previous working versions. We have a CI process that was successfully installing dotnet 2.1.104 on CentOS 7.4. The 2.1.104 package is still available, but the dependencies bumped to dotnet-runtime-deps-2.1.0-rc1 which fails.

Log from May 2018:
yum install -y dotnet-sdk-2.1.104.x86_64
Installed:
dotnet-sdk-2.1.104.x86_64 0:2.1.104-1

Dependency Installed:
aspnetcore-store-2.0.0.x86_64 0:2.0.0-1
aspnetcore-store-2.0.3.x86_64 0:2.0.3-1
aspnetcore-store-2.0.5.x86_64 0:2.0.5-1
aspnetcore-store-2.0.6.x86_64 0:2.0.6-1
dotnet-host.x86_64 0:2.1.0_rc1-1
dotnet-hostfxr-2.0.6.x86_64 0:2.0.6-1
dotnet-runtime-2.0.6.x86_64 0:2.0.6-1
dotnet-runtime-deps-2.1.0-rc1.x86_64 0:2.1.0_rc1-1

Log from June 4 2018:
sudo yum install -y dotnet-sdk-2.1.104.x86_64
Dependencies Resolved
Installing:
dotnet-sdk-2.1.104
Installing for dependencies:
dotnet-host x86_64 2.1.0_rc1-1 packages-microsoft-com-prod 43 k
dotnet-hostfxr-2.0.6 x86_64 2.0.6-1 packages-microsoft-com-prod 182 k
dotnet-runtime-2.0.6 x86_64 2.0.6-1 packages-microsoft-com-prod 24 M
dotnet-runtime-deps-2.1.0-rc1 x86_64 2.1.0_rc1-1 packages-microsoft-com-prod 2.8 k

dotnet-runtime-deps-2.1.0-rc1- FAILED
https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod/dotnet-runtime-deps-2.1.0-rc1-rhel.7-x64.rpm: [Errno 14] HTTPS Error 404 - Not Found

Try to manually install dotnet-host-2.1.0 first and then install SDK or runtime you needed.

aspnetcore-runtime-2.1 for Ubuntu:
apt-get install dotnet-host-2.1.0 aspnetcore-runtime-2.1

dotnet-sdk-2.1 for Centos:
yum install dotnet-host-2.1.0 dotnet-sdk-2.1

I have same problems
spartanetsru 's solution is OK,Thanks

Thanks @spartanetsru . Your Centos fix works.

Clean up of the prod repo is now complete (removed pre-release 2.1 host). [package manager] refresh|update should resolve this issue.

I know this issue is kind of old, but I wanted to point out that I am currently facing a similar error of E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/... on Ubuntu 18.04 when I perform sudo apt -y upgrade or sudo apt install dotnet-sdk-2.1. I opened a issue

Also, I tried @spartanetsru solution but it didn't work:

sudo apt install dotnet-host-2.1.0 dotnet-sdk-2.1

results in:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package dotnet-host-2.1.0
E: Couldn't find any package by glob 'dotnet-host-2.1.0'
E: Couldn't find any package by regex 'dotnet-host-2.1.0'
Was this page helpful?
0 / 5 - 0 ratings