Core: yum install dotnet-sdk-3.0 fails on centos7

Created on 14 Jan 2020  路  11Comments  路  Source: dotnet/core

yum install dotnet-sdk-3.0 fails

General

We're unable to install dotnet-sdk-3.0 on centos7. Here's some steps to reproduce:

  1. Import the RPM key: rpm --import https://packages.microsoft.com/keys/microsoft.asc.
  2. Install the packages RPM file: rpm --upgrade --verbose --hash https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm.
  3. Install dotnet-sdk-3.0: yum install --assumeyes dotnet-sdk-3.0.

EXPECTED: dotnet-sdk-3.0 installs successfully.
ACTUAL:

Error: Package: dotnet-runtime-3.0-3.0.2-1.x86_64 (packages-microsoft-com-prod)
           Requires: dotnet-runtime-deps-3.0 >= 3.0.2
           Available: dotnet-runtime-deps-3.0-3.0.0-1.x86_64 (packages-microsoft-com-prod)
               dotnet-runtime-deps-3.0 = 3.0.0-1
           Available: dotnet-runtime-deps-3.0-3.0.1-1.x86_64 (packages-microsoft-com-prod)
               dotnet-runtime-deps-3.0 = 3.0.1-1

We suspect that it has to do with a missing 3.0.2 package from the repo (as of 1/14/2020 4:27 PM EST):

dotnet-runtime-deps-3.0.1-centos.7-x64.rpm 19-Nov-2019 23:28 2857
dotnet-runtime-deps-3.1.0-centos.7-x64.rpm 03-Dec-2019 21:08 2857
area-setup

Most helpful comment

It's unfortunately normal for the repos to get into this bad state after we push packages as part of a release. The Debian package manager's error message hints at this cause:

File has unexpected size (88725 != 85265). Mirror sync in progress?

I recently filed https://github.com/dotnet/docs/issues/16670 about describing this problem in the troubleshooting section of the install documentation. Hopefully it'll make it easier to tell this is going on and give a reasonable time to wait until it normally resolves itself.

/cc @dleeapho

All 11 comments

We have also found and reproduced this independent of @cjvirtucio87.

Similarly, run:

FROM centos:7

# Get .NET rpm
RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm

# Install .NET
RUN yum install -y aspnetcore-runtime-2.1

And watch it fail:

[root@94ef24c72eda /]# rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
Retrieving https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:packages-microsoft-prod-1.0-1    ################################# [100%]
[root@94ef24c72eda /]# yum install -y aspnetcore-runtime-2.1
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
 * base: mirrors.lug.mtu.edu
 * extras: mirror.oss.ou.edu
 * updates: mirror.umd.edu
base                                                                                                                                                        | 3.6 kB  00:00:00     
extras                                                                                                                                                      | 2.9 kB  00:00:00     
packages-microsoft-com-prod                                                                                                                                 | 2.9 kB  00:00:00     
updates                                                                                                                                                     | 2.9 kB  00:00:00     
(1/5): extras/7/x86_64/primary_db                                                                                                                           | 153 kB  00:00:00     
(2/5): base/7/x86_64/group_gz                                                                                                                               | 165 kB  00:00:00     
(3/5): packages-microsoft-com-prod/primary_db                                                                                                               | 107 kB  00:00:00     
(4/5): updates/7/x86_64/primary_db                                                                                                                          | 5.9 MB  00:00:01     
(5/5): base/7/x86_64/primary_db                                                                                                                             | 6.0 MB  00:00:02     
Resolving Dependencies
--> Running transaction check
---> Package aspnetcore-runtime-2.1.x86_64 0:2.1.15-1 will be installed
--> Processing Dependency: dotnet-runtime-2.1 >= 2.1.15 for package: aspnetcore-runtime-2.1-2.1.15-1.x86_64
--> Running transaction check
---> Package dotnet-runtime-2.1.x86_64 0:2.1.15-1 will be installed
--> Processing Dependency: dotnet-runtime-deps-2.1 >= 2.1.15 for package: dotnet-runtime-2.1-2.1.15-1.x86_64
--> Processing Dependency: dotnet-hostfxr-2.1 >= 2.1.15 for package: dotnet-runtime-2.1-2.1.15-1.x86_64
--> Running transaction check
---> Package dotnet-hostfxr-2.1.x86_64 0:2.1.15-1 will be installed
--> Processing Dependency: dotnet-host >= 2.1.15 for package: dotnet-hostfxr-2.1-2.1.15-1.x86_64
---> Package dotnet-runtime-2.1.x86_64 0:2.1.15-1 will be installed
--> Processing Dependency: dotnet-runtime-deps-2.1 >= 2.1.15 for package: dotnet-runtime-2.1-2.1.15-1.x86_64
--> Running transaction check
---> Package dotnet-host.x86_64 0:3.1.1-1 will be installed
---> Package dotnet-runtime-2.1.x86_64 0:2.1.15-1 will be installed
--> Processing Dependency: dotnet-runtime-deps-2.1 >= 2.1.15 for package: dotnet-runtime-2.1-2.1.15-1.x86_64
--> Finished Dependency Resolution
Error: Package: dotnet-runtime-2.1-2.1.15-1.x86_64 (packages-microsoft-com-prod)
           Requires: dotnet-runtime-deps-2.1 >= 2.1.15
           Available: dotnet-runtime-deps-2.1-2.1.10-1.x86_64 (packages-microsoft-com-prod)
               dotnet-runtime-deps-2.1 = 2.1.10-1
           Available: dotnet-runtime-deps-2.1-2.1.11-1.x86_64 (packages-microsoft-com-prod)
               dotnet-runtime-deps-2.1 = 2.1.11-1
           Available: dotnet-runtime-deps-2.1-2.1.12-1.x86_64 (packages-microsoft-com-prod)
               dotnet-runtime-deps-2.1 = 2.1.12-1
           Available: dotnet-runtime-deps-2.1-2.1.13-1.x86_64 (packages-microsoft-com-prod)
               dotnet-runtime-deps-2.1 = 2.1.13-1
           Available: dotnet-runtime-deps-2.1-2.1.14-1.x86_64 (packages-microsoft-com-prod)
               dotnet-runtime-deps-2.1 = 2.1.14-1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@94ef24c72eda /]#

Repos are down again.

Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.bz2 File has unexpected size (88725 != 85265). Mirror sync in progress? [IP: 13.91.48.226 443]

https://github.com/dotnet/core/issues/3988

@dagood @leecow

It's unfortunately normal for the repos to get into this bad state after we push packages as part of a release. The Debian package manager's error message hints at this cause:

File has unexpected size (88725 != 85265). Mirror sync in progress?

I recently filed https://github.com/dotnet/docs/issues/16670 about describing this problem in the troubleshooting section of the install documentation. Hopefully it'll make it easier to tell this is going on and give a reasonable time to wait until it normally resolves itself.

/cc @dleeapho

I'm reaching out internally to make sure we haven't also missed dotnet-runtime-deps-3.0 3.0.1 per the original report. (I can repro this too in a fresh centos:7 Docker container.)

In the past, I think I remember seeing the rpm file itself showing up fine at https://packages.microsoft.com/centos/7/prod/ along with the others (just being indexed wrong), but the file is missing, so I'm a little concerned. Working to get it resolved as soon as possible if we need to fix this up.

@dagood - I should have been more explicit about this in my comment, and it sounds like you noticed, but I just want to be clear that dotnet-runtime-deps-2.1.15 also seems to be missing as of this comment.

It turns out the tooling logged errors when we tried to push the dotnet-runtime-deps packages, which is why they're missing. @vivmishra is retrying the push, and if it fails again we're filing a ticket with the team that owns the linux package repositories to get help.

The centos7 deps files for 3.1.1 and 3.0.2 are now pushed live. This should unblock 3.0 and 3.1.

2.1.15 publishing is currently behind and not yet available for consumption.

Thanks for the quick responses, @dagood, @vivmishra, and @scalablecory. It's appreciated.

This is now working for me on CentOS 7. In a container that was reproing the issue with dotnet-sdk-3.0, I was able to force the local repo cache to update and then the install works:

sudo yum clean expire-cache
sudo yum install dotnet-sdk-3.0

dotnet-sdk-3.1 also works for me.

Thanks all for the reports and the info, closing as resolved. Please let us know if this problem is still showing up for you and we'll take a look!


Note that 2.1.15 publishing (dotnet-sdk-2.1) isn't done yet, and it's tracked at https://github.com/dotnet/core/issues/4124 because there are issues beyond dotnet-runtime-deps.

Was this page helpful?
0 / 5 - 0 ratings