You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot install .NET Core SDK 2.1 on Fedora 32 #4655
Upgrading from Fedora 31 to 32 dotnet stopped working giving the following error:
[georgi@localhost-home ~]$ dotnet --info
A fatal error occurred, the folder [/usr/lib64/dotnet/host/fxr] does not contain any version-numbered child folders
Fedora 32 includes .NET Core 3.1 in the default repositories. You can dnf install dotnet-sdk-3.1 and it will work out of the box.
On Fedora 31, you had installed the .NET Core 2.1 packages, using the Microsoft repository.
When you upgraded, all the .NET Core packages were upgraded. Now you have a mix of packages. the packages with .fc32 are from the Fedora repository. The packages without that are from the Microsoft repository:
The dotnet-host package, is from the Fedora repository. It is installed at /usr/lib64/dotnet. The other packages are installed at /usr/share/dotnet. Those two installations are, unfortunately, not compatible with each other.
I think you have a couple of options on how to fix this.
If you dont need .NET Core 2.1, you can simply remove the .NET Core 2.1 packages, disable the Microsoft repository and continue.
If you need the .NET Core 2.1 packages, you can remove all .NET Core packages, block the packages from the Fedora repository, then install only the Microsoft packages.
Add this line
excludepkgs=dotnet* aspnet* netstandard*
to the end of the [fedora] section in /etc/yum.repos.d/fedora.repo and at the end of the [updates] section in /etc/yum.repos.d/fedora-updates.repo. Then dnf remove '*dotnet*' and dnf install dotnet-sdk-2.1 should leave you with only Microsoft packages.
Activity
[-]Cannot install .NET Core SDK 2.1 on Fedora 21[/-][+]Cannot install .NET Core SDK 2.1 on Fedora 32[/+]omajid commentedon May 7, 2020
I think I know why this happens.
Fedora 32 includes .NET Core 3.1 in the default repositories. You can
dnf install dotnet-sdk-3.1and it will work out of the box.On Fedora 31, you had installed the .NET Core 2.1 packages, using the Microsoft repository.
When you upgraded, all the .NET Core packages were upgraded. Now you have a mix of packages. the packages with
.fc32are from the Fedora repository. The packages without that are from the Microsoft repository:The
dotnet-hostpackage, is from the Fedora repository. It is installed at/usr/lib64/dotnet. The other packages are installed at/usr/share/dotnet. Those two installations are, unfortunately, not compatible with each other.I think you have a couple of options on how to fix this.
If you dont need .NET Core 2.1, you can simply remove the .NET Core 2.1 packages, disable the Microsoft repository and continue.
If you need the .NET Core 2.1 packages, you can remove all .NET Core packages, block the packages from the Fedora repository, then install only the Microsoft packages.
Add this line
to the end of the
[fedora]section in/etc/yum.repos.d/fedora.repoand at the end of the[updates]section in/etc/yum.repos.d/fedora-updates.repo. Thendnf remove '*dotnet*'anddnf install dotnet-sdk-2.1should leave you with only Microsoft packages.You can also download and run the .NET Core 2.1 SDK from a tarball: https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-2.1.805-linux-x64-binaries. This would leave the existing packages on the system.
Most dangerous: You can download and extract the contents of the tarball into
/usr/lib64/dotnet/as suggested on Add installation instructions for Fedora 32 docs#18070 (comment).gmarokov commentedon May 10, 2020
@omajid thanks for the quick reply! As I needed 2.1 for the current project went with option 2 without any problems. Many thanks again :)