Skip to content

CentOS, RHEL: aspnetcore-runtime RPM doesn't install the ASP.NET Core Runtime #3886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dagood opened this issue Nov 21, 2019 · 10 comments
Open
Assignees
Labels
area-setup Issues related to installing .NET Core

Comments

@dagood
Copy link
Member

dagood commented Nov 21, 2019

Copy of #3863, where the specific repro was resolved, but it seems it still happens on other distros and versions.

I believe this may still happen on some distros in any of 2.1, 2.2, or 3.0.

Yesterday, following the instructions on the above page resulted in the following information being shown when performing a dotnet --info command:

$ dotnet --info

Host (useful for support):
  Version: 2.2.7
  Commit:  b1e29ae826

.NET Core SDKs installed:
  No SDKs were found.

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Today, following the same instructions produces the following output:

$ dotnet --info

Host (useful for support):
  Version: 2.2.8
  Commit:  b9aa1abc51

.NET Core SDKs installed:
  No SDKs were found.

.NET Core runtimes installed:
  Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

... and a number of our services fail to start with an error:
It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.

/cc @leecow

@bobbyvacco
Copy link

bobbyvacco commented Nov 21, 2019

I'm having this problem as well - looks like i should be getting the download for aspnetcore-runtime-2.2.8-x64.rpm, but there's a reference to aspnetcore-runtime-2.2.8-rh.rhel.7-x64.rpm instead (which doesn't exist).

@dagood
Copy link
Member Author

dagood commented Nov 21, 2019

Yeah, there are two cases here:

  1. The repo tells the RPM client to download aspnetcore-runtime-2.2.8-rh.rhel.7-x64.rpm and it does exist. The install command succeeds, but the rh.rhel.7 package installs the runtime in a different place that the Microsoft dotnet-sdk package can't find.
    • Tracked by this issue.
  2. The repo tells the RPM client to download aspnetcore-runtime-2.2.8-rh.rhel.7-x64.rpm, and it doens't exist. The install command fails with a 404 error.

Which one you hit depends on which distro you're on and whether you're installing 2.1/2.2/3.0.

Once the rh.rhel.7 packages are purged from the Microsoft linux repos for all versions and distros, we can close this issue because then every bad case will be a 404. I think it's worth tracking separately because (1) is more confusing when you run into it.

@leecow leecow self-assigned this Nov 21, 2019
@luiszuniga1980
Copy link

The same here.
Trying to install DotNet Core in a RedHat 7 env
command: yum -y install dotnet-sdk-2.2

error:
Total size: 173 M
Total download size: 30 M
Installed size: 173 M
Downloading packages:
aspnetcore-runtime-2.2.8-rh.rh FAILED
https://packages.microsoft.com/rhel/7/prod/aspnetcore-runtime-2.2.8-rh.rhel.7-x64.rpm: [Errno 14] HTTPS Error 404 - Not Found ] 0.0 B/s | 0 B --:--:-- ETA
Trying other mirror.

The same error for older 2.2 versions

The missing file is not here:
https://packages.microsoft.com/rhel/7/prod/

Thanks

@dagood
Copy link
Member Author

dagood commented Nov 21, 2019

I think it's worth mentioning that the workaround for the 404 also works for this issue:

#3875 (comment)

For now, it's possible to work around this issue by taking the URL that hit the 404, removing the rh.rhel7- part of the filename, then running yum install against it:

# CentOS example:
$ sudo yum install https://packages.microsoft.com/centos/7/prod/aspnetcore-runtime-3.0.1-x64.rpm
$ sudo yum install dotnet-sdk-3.0

You can also download it (wget) and install it using rpm -i. #3863 (comment)

@thepaleone
Copy link

Thanks, I missed the workaround when I ran across that one, that got me working!

@andrewaggb
Copy link

Just ran into this today on a couple machines. Your work around worked, thanks!

@scalablecory
Copy link
Contributor

@leecow is this still an issue?

@soondook
Copy link

soondook commented Dec 19, 2020

You need run command "$ sudo yum makecache", for example:
It's work for me!
dotnet --version
3.1.404

@j-hudecek
Copy link

Still an issue on RHEL8.3, aspnetcore-runtime-2.1 installs into /usr/share/dotnet/shared/Microsoft.AspNetCore.All but dotnet lives in /usr/lib64/dotnet/shared/. Creating the symlinks makes it go brrr

ln -s /usr/share/dotnet/shared/Microsoft.AspNetCore.All/ /usr/lib64/dotnet/shared/Microsoft.AspNetCore.All
ln -s /usr/share/dotnet/shared/Microsoft.AspNetCore.App/ /usr/lib64/dotnet/shared/Microsoft.AspNetCore.App

@omajid
Copy link
Member

omajid commented Feb 3, 2021

Hey @j-hudecek! Thanks for pointing this out.

In case you are not aware, there's a workaround for this documented here. The TLDR is to publish applications like this:

dotnet publish -f netcoreapp2.1 -c Release -r rhel.8-x64 --self-contained false /p:MicrosoftNETPlatformLibrary=Microsoft.NETCore.App

Installing the packages and symlinking might also work, but it's more brittle than using this MicrosoftNETPlatformLibrary property.

The issues is fixed in later releases (3.1 and 5.0 as of this writing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-setup Issues related to installing .NET Core
Projects
None yet
Development

No branches or pull requests

10 participants