Problem encountered on https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install
Operating System: linux
$ cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
Provide details about the problem you are experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.
$ sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
$ sudo yum install dotnet-sdk-3.0
$ sudo yum install dotnet-sdk-3.0
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.xxx.nl
* extras: mirror.xxx.eu
* updates: mirror.xxx.nl
Resolving Dependencies
--> Running transaction check
---> Package dotnet-sdk-3.0.x86_64 0:3.0.101-1 will be installed
--> Processing Dependency: netstandard-targeting-pack-2.1 >= 2.1.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Processing Dependency: aspnetcore-runtime-3.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Processing Dependency: dotnet-targeting-pack-3.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Processing Dependency: dotnet-runtime-3.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Processing Dependency: aspnetcore-targeting-pack-3.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Processing Dependency: dotnet-apphost-pack-3.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Running transaction check
---> Package aspnetcore-runtime-3.0.x86_64 0:3.0.1-1 will be installed
---> Package aspnetcore-targeting-pack-3.0.x86_64 0:3.0.1-1 will be installed
---> Package dotnet-apphost-pack-3.0.x86_64 0:3.0.1-1 will be installed
---> Package dotnet-runtime-3.0.x86_64 0:3.0.1-1 will be installed
--> Processing Dependency: dotnet-hostfxr-3.0 >= 3.0.1 for package: dotnet-runtime-3.0-3.0.1-1.x86_64
--> Processing Dependency: dotnet-runtime-deps-3.0 >= 3.0.1 for package: dotnet-runtime-3.0-3.0.1-1.x86_64
---> Package dotnet-targeting-pack-3.0.x86_64 0:3.0.1-1 will be installed
---> Package netstandard-targeting-pack-2.1.x86_64 0:2.1.0-1 will be installed
--> Running transaction check
---> Package dotnet-hostfxr-3.0.x86_64 0:3.0.1-1 will be installed
--> Processing Dependency: dotnet-host >= 3.0.1 for package: dotnet-hostfxr-3.0-3.0.1-1.x86_64
---> Package dotnet-runtime-deps-3.0.x86_64 0:3.0.1-1 will be installed
--> Processing Dependency: libicu for package: dotnet-runtime-deps-3.0-3.0.1-1.x86_64
--> Running transaction check
---> Package dotnet-host.x86_64 0:3.0.1-1 will be installed
---> Package libicu.x86_64 0:50.2-3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================
Installing:
dotnet-sdk-3.0 x86_64 3.0.101-1 packages-microsoft-com-prod 64 M
Installing for dependencies:
aspnetcore-runtime-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 7.5 M
aspnetcore-targeting-pack-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 1.4 M
dotnet-apphost-pack-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 66 k
dotnet-host x86_64 3.0.1-1 packages-microsoft-com-prod 39 k
dotnet-hostfxr-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 147 k
dotnet-runtime-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 29 M
dotnet-runtime-deps-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 2.8 k
dotnet-targeting-pack-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 3.4 M
libicu x86_64 50.2-3.el7 base 6.9 M
netstandard-targeting-pack-2.1 x86_64 2.1.0-1 packages-microsoft-com-prod 2.1 M
Transaction Summary
================================================================================================================================================
Install 1 Package (+10 Dependent packages)
Total size: 114 M
Total download size: 2.1 M
Installed size: 132 M
Is this ok [y/d/N]: y
Downloading packages:
netstandard-targeting-pack-2.1 FAILED ] 0.0 B/s | 0 B --:--:-- ETA
https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=packages-microsoft-com-prod clean metadata
Trying other mirror.
Error downloading packages:
netstandard-targeting-pack-2.1-2.1.0-1.x86_64: [Errno 256] No more mirrors to try.
yum --enablerepo=packages-microsoft-com-prod clean metadata
$ rm -rf /var/cache/yum/*
$ yum clean all
$ yum update
$ yum repolist
yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.xxx.nl
* extras: mirror.xxx.eu
* updates: mirror.xxx.nl
repo id repo name status
base/7/x86_64 CentOS-7 - Base 10,097
extras/7/x86_64 CentOS-7 - Extras 305
packages-microsoft-com-prod packages-microsoft-com-prod 173
updates/7/x86_64 CentOS-7 - Updates 738
repolist: 11,313
$ yum search dotnet-runtime
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.webruimtehosting.nl
* extras: mirror.yourwebhoster.eu
* updates: mirror.neostrada.nl
========================================================= N/S matched: dotnet-runtime ==========================================================
dotnet-runtime-deps-2.1.x86_64 : dotnet-runtime-deps-2.1 2.1.14
dotnet-runtime-deps-2.2.x86_64 : dotnet-runtime-deps-2.2 2.2.8
dotnet-runtime-deps-3.0.x86_64 : dotnet-runtime-deps-3.0 3.0.1
dotnet-runtime-2.1.x86_64 : Microsoft .NET Core Runtime - 2.1.14 Microsoft.NETCore.App
dotnet-runtime-2.2.x86_64 : Microsoft .NET Core Runtime - 2.2.8 Microsoft.NETCore.App
dotnet-runtime-3.0.x86_64 : Microsoft .NET Core Runtime - 3.0.1 Microsoft.NETCore.App
Name and summary matches only, use "search all" for everything.
[root@example ~]# yum search netstandard-targeting-pack
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.webruimtehosting.nl
* extras: mirror.yourwebhoster.eu
* updates: mirror.neostrada.nl
=================================================== N/S matched: netstandard-targeting-pack ====================================================
netstandard-targeting-pack-2.1.x86_64 : NETStandard.Library.Ref 2.1.0
Name and summary matches only, use "search all" for everything.
https://github.com/dotnet/core/issues/3756
https://github.com/dotnet/core/issues/3747
+1
If you look at https://packages.microsoft.com/centos/7/prod/repodata/, you see that repmd was updated on Nov. 19, but filelists.xml.gz was not.
On the other hand, looking at https://packages.microsoft.com/centos/7/prod/, you can see that netstandard-targeting-pack-2.1.0-x64.rpm was also updated on Nov. 19.
So it's quite likely that repodata/filelist.xml.gz is out of date.
If you're really sure the netstandard-targeting-pack-2.1.0-x64.rpm on the Microsoft repo is correct, you can work around this issue like this:
sudo yum install -y https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm
sudo yum install dotnet-sdk-3.0
I'm sending a mail to the Linux repo admins to see what's going on here. This kind of thing has happened in the past due to the service not syncing properly, only updating the RPM or only updating the checksums.
The line in those logs that really shows what this is is this one, by the way:
https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=packages-microsoft-com-prod clean metadata
(Big thanks for the complete logs!)
@dagood is the Linux release process open sourced?
Unfortunately not, and visibility (even mine) is very limited.
ok, that's a shame :disappointed: . hope this gets fixed soon, it's blocking system upgrades.
As far as I can tell if I remove this package, I won't be able to reinstall it(!)
@qmfrederik's workaround seems like it will work as a short-term workaround. The packages themselves are signed, so we know that the integrity at least is ok.
sudo yum install -y https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm sudo yum install dotnet-sdk-3.0
$ rpm -v --checksig netstandard-targeting-pack-2.1.0-x64.rpm
netstandard-targeting-pack-2.1.0-x64.rpm:
Header V4 RSA/SHA256 Signature, key ID be1229cf: OK
Header SHA1 digest: OK
V4 RSA/SHA256 Signature, key ID be1229cf: OK
MD5 digest: OK
The Linux repo admins do tend to respond to direct problems like this fairly quickly, so hopefully this will be resolved soon (today).
This definitely also affects rhel/7 (same symptoms). That doesn't appear to be a surprise, though.
The Linux repo admins have tried to regenerate the filelists to fix this problem. It didn't work for me, but it might be worth retrying in case it's somehow on my end. They're continuing to look at the problem. I don't have an ETA yet but I will update once I hear more.
There are still issues
netstandard-targeting-pack-2.1 FAILED ======== ] 12 MB/s | 82 MB 00:00:02 ETA
https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=packages-microsoft-com-prod clean metadata
Trying other mirror.
(10/11): dotnet-sdk-3.0.100-x64.rpm | 64 MB 00:00:07
Error downloading packages:
netstandard-targeting-pack-2.1-2.1.0-1.x86_64: [Errno 256] No more mirrors to try.
@qmfrederik I try your way, it works, thx!
This also affects openSUSE, blocking system upgrades:
Warning: Digest verification failed for file 'netstandard-targeting-pack-2.1.0-x64.rpm'
[/var/tmp/AP_0xVT8ecp/netstandard-targeting-pack-2.1.0-x64.rpm]
expected fa194a8c12913dcec85c8d24bfc91686a7b93128b4c05346df16e2c641e2ba41
but got 45e199caf1151a750d11d9c5c7669d6e23d8dbb33da54d1d90bde55745996480
Accepting packages with wrong checksums can lead to a corrupted system and in extreme cases even to a system compromise.
Are there any plans in the roadmap to open-source the release pipeline?
The community can't help resolve this / maintain ongoing changes e.g. https://github.com/dotnet/core/issues/3876 when it's proprietary.
Given this completely blocks system updates/upgrades for stable users across multiple distributions, can we get some update on this?
To echo @craigjbass : can we get some level of transparency around this? Everything's closed, we have no direct comms to the team and bugs like this are breaking people's systems.
Are there any plans in the roadmap to open-source the release pipeline?
I can't speak for Microsoft, but one common approach used by many open source projects is that the Linux distribution community itself takes care of maintaining and packaging projects for their own distribution.
If that path sounds appealing to you, please get involved in https://github.com/dotnet/source-build/ and packaging for your favourite distribution. source-build is what the .NET Core packages from Red Hat (rh-dotnet* in RHEL and CentOS), and dotnet-SIG packages in Fedora Copr are based on.
The Linux repo admins are able to repro the issue but are having trouble figuring it out. I pointed out the checksum issue more concretely to them last night (~15hr ago) and I'll update here once I get a response.
Are there any plans in the roadmap to open-source the release pipeline?
I can't speak for Microsoft, but one common approach used by many open source projects is that the Linux distribution community itself takes care of maintaining and packaging projects for their own distribution.
This is the way forward IMO. I'm not aware of any plans to make the Microsoft linux repo publishing tools or service open.
The only transparency improvement I'm aware of is a plan to put a service health status page online. I don't know any ETA for this. (And yeah, it doesn't seem helpful in this situation because the repo is online, but invalid.)
Now there is a new dependency gaffe - when I run the following (from cent7 dockerfile):
RUN set -e; \
rpm --import https://packages.microsoft.com/keys/microsoft.asc; \
rpm --upgrade --verbose --hash https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm;
I am getting the following:
Downloading packages:
--
https://packages.microsoft.com/centos/7/prod/aspnetcore-runtime-3.0.1-rh.rhel.7-x64.rpm: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
Looks like the dependency management is messed up - that URL refers to a resource that does not exist.
...aspnetcore-runtime-3.0.1-rh.rhel.7-x64.rpm: [Errno 14] HTTPS Error 404 - Not Found
This looks like a repro of https://github.com/dotnet/core/issues/3875 (RHEL 7) on a new platform (CentOS 7), noting it over there.
The Linux repo admins have fixed this for CentOS 7, but not Fedora, openSUSE, or RHEL yet. Still working on it.
The admins determined we might be able to fix this by deleting and reuploading the affected packages ourselves. @leecow is working on it.
@dagood And when package netstandard-targeting-pack-2.1.0-x64.rpm for Fedora 30 will be resigned ?
I've errors:
[MIRROR] netstandard-targeting-pack-2.1.0-x64.rpm: Downloading successful, but checksum doesn't match. Calculated: 45e199caf1151a750d11d9c5c7669d6e23d8dbb33da54d1d90bde55745996480(sha256) Expected: fa194a8c12913dcec85c8d24bfc91686a7b93128b4c05346df16e2c641e2ba41(sha256)
[MIRROR] netstandard-targeting-pack-2.1.0-x64.rpm: Downloading successful, but checksum doesn't match. Calculated: 45e199caf1151a750d11d9c5c7669d6e23d8dbb33da54d1d90bde55745996480(sha256) Expected: fa194a8c12913dcec85c8d24bfc91686a7b93128b4c05346df16e2c641e2ba41(sha256)
[MIRROR] netstandard-targeting-pack-2.1.0-x64.rpm: Downloading successful, but checksum doesn't match. Calculated: 45e199caf1151a750d11d9c5c7669d6e23d8dbb33da54d1d90bde55745996480(sha256) Expected: fa194a8c12913dcec85c8d24bfc91686a7b93128b4c05346df16e2c641e2ba41(sha256)
(10/12): dotnet-runtime-3.0.1-x64.rpm 1.9 MB/s | 29 MB 00:14
[MIRROR] netstandard-targeting-pack-2.1.0-x64.rpm: Downloading successful, but checksum doesn't match. Calculated: 45e199caf1151a750d11d9c5c7669d6e23d8dbb33da54d1d90bde55745996480(sha256) Expected: fa194a8c12913dcec85c8d24bfc91686a7b93128b4c05346df16e2c641e2ba41(sha256)
[FAILED] netstandard-targeting-pack-2.1.0-x64.rpm: No more mirrors to try - All mirrors were already tried without success
The delete + reupload is about forcing the repos to purge some old bad checksums they are currently storing, there is no problem with signing. I don't have any ETA, @leecow may be able to give an update.
Cleared up some permissions problems and working my way through the rpm repos now.
I used to have the checksum problem. Now I'm facing a new problem:
sudo dnf install dotnet-sdk-3.0
Last metadata expiration check: 0:04:26 ago on Fri 22 Nov 2019 03:47:33 PM -03.
Error:
Problem: conflicting requests
@castelobranco - I'm running through the re-uploads now.
This should be resolved for all rpm repos now. Sorry that took so long!
@leecow This problem has appeared to have re-emergerd sometime yesterday. Got the following when building a Docker image with --no-cache:
Step 2/6 : RUN set -e; rpm --import https://packages.microsoft.com/keys/microsoft.asc; rpm --upgrade --verbose --hash https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm; INSTALL_PKGS="dotnet-sdk-3.0"; yum install --assumeyes --setopt=tsflags=nodocs ${INSTALL_PKGS}; yum --assumeyes update; yum clean all --assumeyes; rm --recursive --force /var/cache/yum;
---> Running in dbc9e40a2566
Retrieving https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
Preparing... ########################################
Updating / installing...
packages-microsoft-prod-1.0-1 ########################################
Loaded plugins: ovl
Resolving Dependencies
--> Running transaction check
---> Package dotnet-sdk-3.0.x86_64 0:3.0.101-1 will be installed
--> Processing Dependency: netstandard-targeting-pack-2.1 >= 2.1.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Processing Dependency: aspnetcore-runtime-3.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Processing Dependency: dotnet-targeting-pack-3.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Processing Dependency: dotnet-runtime-3.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Processing Dependency: aspnetcore-targeting-pack-3.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Processing Dependency: dotnet-apphost-pack-3.0 for package: dotnet-sdk-3.0-3.0.101-1.x86_64
--> Running transaction check
---> Package aspnetcore-runtime-3.0.x86_64 0:3.0.1-1 will be installed
---> Package aspnetcore-targeting-pack-3.0.x86_64 0:3.0.1-1 will be installed
---> Package dotnet-apphost-pack-3.0.x86_64 0:3.0.1-1 will be installed
---> Package dotnet-runtime-3.0.x86_64 0:3.0.1-1 will be installed
--> Processing Dependency: dotnet-hostfxr-3.0 >= 3.0.1 for package: dotnet-runtime-3.0-3.0.1-1.x86_64
--> Processing Dependency: dotnet-runtime-deps-3.0 >= 3.0.1 for package: dotnet-runtime-3.0-3.0.1-1.x86_64
---> Package dotnet-targeting-pack-3.0.x86_64 0:3.0.0-1 will be installed
---> Package netstandard-targeting-pack-2.1.x86_64 0:2.1.0-1 will be installed
--> Running transaction check
---> Package dotnet-hostfxr-3.0.x86_64 0:3.0.1-1 will be installed
--> Processing Dependency: dotnet-host >= 3.0.1 for package: dotnet-hostfxr-3.0-3.0.1-1.x86_64
---> Package dotnet-runtime-deps-3.0.x86_64 0:3.0.1-1 will be installed
--> Processing Dependency: libicu for package: dotnet-runtime-deps-3.0-3.0.1-1.x86_64
--> Running transaction check
---> Package dotnet-host.x86_64 0:3.0.1-1 will be installed
---> Package libicu.x86_64 0:50.2-3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dotnet-sdk-3.0 x86_64 3.0.101-1 packages-microsoft-com-prod 64 M
Installing for dependencies:
aspnetcore-runtime-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 7.4 M
aspnetcore-targeting-pack-3.0
x86_64 3.0.1-1 packages-microsoft-com-prod 1.4 M
dotnet-apphost-pack-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 66 k
dotnet-host x86_64 3.0.1-1 packages-microsoft-com-prod 39 k
dotnet-hostfxr-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 147 k
dotnet-runtime-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 29 M
dotnet-runtime-deps-3.0 x86_64 3.0.1-1 packages-microsoft-com-prod 2.8 k
dotnet-targeting-pack-3.0 x86_64 3.0.0-1 packages-microsoft-com-prod 3.4 M
libicu x86_64 50.2-3.el7 caasd-Cent7-base 6.9 M
netstandard-targeting-pack-2.1
x86_64 2.1.0-1 packages-microsoft-com-prod 2.1 M
Transaction Summary
================================================================================
Install 1 Package (+10 Dependent packages)
Total download size: 114 M
Installed size: 149 M
Downloading packages:
https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=packages-microsoft-com-prod clean metadata
Trying other mirror.
Error downloading packages:
netstandard-targeting-pack-2.1-2.1.0-1.x86_64: [Errno 256] No more mirrors to try.
Works beautifully when I switch to the RHEL7 RPMs.
@yoshiya8 I don't hit the issue on a fresh CentOS 7 container, this works fine for me (your commands + dotnet --info):
docker run -it --rm centos:7 bash -c '
rpm --import https://packages.microsoft.com/keys/microsoft.asc
rpm --upgrade --verbose --hash https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
INSTALL_PKGS="dotnet-sdk-3.0"
yum install --assumeyes --setopt=tsflags=nodocs ${INSTALL_PKGS}
dotnet --info'
That is interesting - I cannot run the same thing exactly because we are behind a proxy with SSL packet inspection... I will see if I can get something similar going.
@dagood - This is very interesting that worked beautifully with my base container. Now I just need to figure out why this recipe is not working in my Docker build...
I'm seeing @leecow said the repo is updated everywhere but I just tried the same steps as in the "steps to reproduce this issue" and got the same failure. I am running centos 7 as a virtual server on aws EC2 that I just spun up today.
I did not think to run "yum update" prior to attempting to install, but I doubt that would have anything to do with the issue.
I ended up using the "install -y" command shown in the replies above to get it to install.
I did not think to run "yum update" prior to attempting to install, but I doubt that would have anything to do with the issue.
Yeah, I wouldn't expect this to make a difference.
@DedicatedManagers in a new issue, can you please post your log (especially the error lines) and commands that you ran? What is the sha256 checksum of what you get when you manually download the RPM (from inside the VM)?
The only reason I can imagine you'd hit it now is some weird caching or proxy issue. We've verified that as far as we're able to repro, this was broken before and fixed now.
@dagood I'll be spinning up another server in a week or so and will report back if the issue is still there then.
Just occurred to me as well:
[MIRROR] netstandard-targeting-pack-2.1.0-x64.rpm: Downloading successful, but checksum doesn't match. Calculated: 45e199caf1151a750d11d9c5c7669d6e23d8dbb33da54d1d90bde55745996480(sha256) Expected: fa194a8c12913dcec85c8d24bfc91686a7b93128b4c05346df16e2c641e2ba41(sha256)
[FAILED] netstandard-targeting-pack-2.1.0-x64.rpm: No more mirrors to try - All mirrors were already tried without success
Occurring for me as of today on Amazon Linux 2 using the CentOS 7 repo. Was working fine yesterday.
#> yum install dotnet-sdk-3.1
[...]
Is this ok [y/d/N]: y
Downloading packages:
netstandard-targeting-pack-2.1 FAILED
https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=packages-microsoft-com-prod clean metadata
Trying other mirror.
Error downloading packages:
netstandard-targeting-pack-2.1-2.1.0-1.x86_64: [Errno 256] No more mirrors to try.
@thecosmicfrog I'm unable to repro--I suggest the same as above: in a new issue, can you please post your log and commands that you ran? What is the sha256 checksum of what you get when you manually download the RPM? More details about the scenario (are you running in Docker, is there a firewall/proxy involved) also recommended.
@dagood Thanks for the response. I am following the exact instructions as per:
https://docs.microsoft.com/en-ie/dotnet/core/install/linux-package-manager-centos7
Specifically:
#> rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
#> yum install dotnet-sdk-3.1
The exact output of the above commands are:
#> 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%]
#> yum install dotnet-sdk-3.1
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 2.4 kB 00:00:00
packages-microsoft-com-prod | 2.9 kB 00:00:00
packages-microsoft-com-prod/primary_db | 114 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package dotnet-sdk-3.1.x86_64 0:3.1.101-1 will be installed
--> Processing Dependency: netstandard-targeting-pack-2.1 >= 2.1.0 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Processing Dependency: dotnet-targeting-pack-3.1 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Processing Dependency: dotnet-apphost-pack-3.1 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Processing Dependency: dotnet-runtime-3.1 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Processing Dependency: aspnetcore-targeting-pack-3.1 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Processing Dependency: aspnetcore-runtime-3.1 for package: dotnet-sdk-3.1-3.1.101-1.x86_64
--> Running transaction check
---> Package aspnetcore-runtime-3.1.x86_64 0:3.1.1-1 will be installed
---> Package aspnetcore-targeting-pack-3.1.x86_64 0:3.1.0-1 will be installed
---> Package dotnet-apphost-pack-3.1.x86_64 0:3.1.1-1 will be installed
---> Package dotnet-runtime-3.1.x86_64 0:3.1.1-1 will be installed
--> Processing Dependency: dotnet-runtime-deps-3.1 >= 3.1.1 for package: dotnet-runtime-3.1-3.1.1-1.x86_64
--> Processing Dependency: dotnet-hostfxr-3.1 >= 3.1.1 for package: dotnet-runtime-3.1-3.1.1-1.x86_64
---> Package dotnet-targeting-pack-3.1.x86_64 0:3.1.0-1 will be installed
---> Package netstandard-targeting-pack-2.1.x86_64 0:2.1.0-1 will be installed
--> Running transaction check
---> Package dotnet-hostfxr-3.1.x86_64 0:3.1.1-1 will be installed
--> Processing Dependency: dotnet-host >= 3.1.1 for package: dotnet-hostfxr-3.1-3.1.1-1.x86_64
---> Package dotnet-runtime-deps-3.1.x86_64 0:3.1.1-1 will be installed
--> Running transaction check
---> Package dotnet-host.x86_64 0:3.1.1-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================
Installing:
dotnet-sdk-3.1 x86_64 3.1.101-1 packages-microsoft-com-prod 63 M
Installing for dependencies:
aspnetcore-runtime-3.1 x86_64 3.1.1-1 packages-microsoft-com-prod 7.5 M
aspnetcore-targeting-pack-3.1 x86_64 3.1.0-1 packages-microsoft-com-prod 1.4 M
dotnet-apphost-pack-3.1 x86_64 3.1.1-1 packages-microsoft-com-prod 67 k
dotnet-host x86_64 3.1.1-1 packages-microsoft-com-prod 39 k
dotnet-hostfxr-3.1 x86_64 3.1.1-1 packages-microsoft-com-prod 148 k
dotnet-runtime-3.1 x86_64 3.1.1-1 packages-microsoft-com-prod 29 M
dotnet-runtime-deps-3.1 x86_64 3.1.1-1 packages-microsoft-com-prod 2.8 k
dotnet-targeting-pack-3.1 x86_64 3.1.0-1 packages-microsoft-com-prod 3.4 M
netstandard-targeting-pack-2.1 x86_64 2.1.0-1 packages-microsoft-com-prod 2.1 M
Transaction Summary
=======================================================================================================================================================================
Install 1 Package (+9 Dependent packages)
Total download size: 107 M
Installed size: 107 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/2/packages-microsoft-com-prod/packages/aspnetcore-targeting-pack-3.1.0.rpm: Header V4 RSA/SHA256 Signature, key ID be1229cf: NOKEY
Public key for aspnetcore-targeting-pack-3.1.0.rpm is not installed
(1/10): aspnetcore-targeting-pack-3.1.0.rpm | 1.4 MB 00:00:00
(2/10): aspnetcore-runtime-3.1.1-x64.rpm | 7.5 MB 00:00:00
(3/10): dotnet-host-3.1.1-x64.rpm | 39 kB 00:00:00
(4/10): dotnet-apphost-pack-3.1.1-x64.rpm | 67 kB 00:00:00
(5/10): dotnet-hostfxr-3.1.1-x64.rpm | 148 kB 00:00:00
(6/10): dotnet-runtime-deps-3.1.1-centos.7-x64.rpm | 2.8 kB 00:00:00
(7/10): dotnet-runtime-3.1.1-x64.rpm | 29 MB 00:00:00
(8/10): dotnet-targeting-pack-3.1.0-x64.rpm | 3.4 MB 00:00:00
netstandard-targeting-pack-2.1 FAILED
https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=packages-microsoft-com-prod clean metadata
Trying other mirror.
(9/10): dotnet-sdk-3.1.101-x64.rpm | 63 MB 00:00:03
Error downloading packages:
netstandard-targeting-pack-2.1-2.1.0-1.x86_64: [Errno 256] No more mirrors to try.
...per commands:
#> wget https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
--2020-02-07 11:58:32-- https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
Resolving packages.microsoft.com (packages.microsoft.com)... 13.74.252.37
Connecting to packages.microsoft.com (packages.microsoft.com)|13.74.252.37|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1999 (2.0K) [application/x-redhat-package-manager]
Saving to: ‘packages-microsoft-prod.rpm’
100%[=============================================================================================================================>] 1,999 --.-K/s in 0s
2020-02-07 11:58:32 (252 MB/s) - ‘packages-microsoft-prod.rpm’ saved [1999/1999]
#> sha256sum packages-microsoft-prod.rpm
35f08f2b53ef355e07037e3e7b9660e479a64a605691ec96666b401e31a0f004 packages-microsoft-prod.rpm
#> wget https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm
--2020-02-07 12:07:22-- https://packages.microsoft.com/centos/7/prod/netstandard-targeting-pack-2.1.0-x64.rpm
Resolving packages.microsoft.com (packages.microsoft.com)... 13.74.252.37
Connecting to packages.microsoft.com (packages.microsoft.com)|13.74.252.37|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2201944 (2.1M) [application/x-redhat-package-manager]
Saving to: ‘netstandard-targeting-pack-2.1.0-x64.rpm’
100%[=============================================================================================================================>] 2,201,944 --.-K/s in 0.04s
2020-02-07 12:07:22 (47.5 MB/s) - ‘netstandard-targeting-pack-2.1.0-x64.rpm’ saved [2201944/2201944]
#> sha256sum netstandard-targeting-pack-2.1.0-x64.rpm
45e199caf1151a750d11d9c5c7669d6e23d8dbb33da54d1d90bde55745996480 netstandard-targeting-pack-2.1.0-x64.rpm
No proxies, firewall or Docker containers involved. Just a direct Yum download from the Internet.
Thanks.
Most helpful comment
If you're really sure the netstandard-targeting-pack-2.1.0-x64.rpm on the Microsoft repo is correct, you can work around this issue like this: