Hello,
My Fedora 42 dist couldn’t find the .NET9 SDK, running dotnet --list-sdks nothing shows up, running dotnet --list-runtimes I get both aspetnet and dotnet 9 runtimes.
Trying to reinstall dotnet 9 sdk says it fails and tells me it’s already installed.
I’ve uninstalled dotnet9 sdk and removed the dotnet folders from /usr/share/dotnet and /usr/lib64/dotnet and then reinstall dotnet9.
Since the reinstall when I try to run dotnet --list-sdks I’m getting dotnet command not found, install package dotnet-host to provide command dotnet.
When I type y to install it I get it’s already installed.
It’s currently blocking me from work and my only guess to “fix” it is going back to Fedora 41 and hope it magically works, but before I do that, I hope someone here have any guesses to a solution.
Something happened between thursday and friday, since I was able to work normally on thursday, then I got some updates and friday morning it stopped working.
I have done that, problem is there are not sdks intalled according to dotnet --info.
Host:
Version: 9.0.4
Architecture: x64
Commit: b7deac6d42
RID: fedora.42-x64
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.4 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.4 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
The only difference I can see comparing to you is that you are using an older SDK coming from the fedora packages, global.json in my project is set to 9.0.203, but it worked last week.
Package Arch Version Repository Size
Reinstalling:
aspnetcore-runtime-9.0 x86_64 9.0.4-1.fc42 updates 22.3 MiB
replacing aspnetcore-runtime-9.0 x86_64 9.0.4-1.fc42 updates 22.3 MiB
aspnetcore-targeting-pack-9.0 x86_64 9.0.4-1.fc42 updates 14.6 MiB
replacing aspnetcore-targeting-pack-9.0 x86_64 9.0.4-1.fc42 updates 14.6 MiB
dotnet-apphost-pack-9.0 x86_64 9.0.4-1.fc42 updates 11.1 MiB
replacing dotnet-apphost-pack-9.0 x86_64 9.0.4-1.fc42 updates 11.1 MiB
dotnet-host x86_64 9.0.4-1.fc42 updates 302.0 KiB
replacing dotnet-host x86_64 9.0.4-1.fc42 updates 302.0 KiB
dotnet-hostfxr-9.0 x86_64 9.0.4-1.fc42 updates 309.4 KiB
replacing dotnet-hostfxr-9.0 x86_64 9.0.4-1.fc42 updates 309.4 KiB
dotnet-runtime-9.0 x86_64 9.0.4-1.fc42 updates 70.5 MiB
replacing dotnet-runtime-9.0 x86_64 9.0.4-1.fc42 updates 70.5 MiB
dotnet-sdk-9.0 x86_64 9.0.203-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod 374.9 MiB
replacing dotnet-sdk-9.0 x86_64 9.0.203-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod 374.9 MiB
dotnet-targeting-pack-9.0 x86_64 9.0.4-1.fc42 updates 36.9 MiB
replacing dotnet-targeting-pack-9.0 x86_64 9.0.4-1.fc42 updates 36.9 MiB
Transaction Summary:
Reinstalling: 8 packages
Replacing: 8 packages
Total size of inbound packages is 187 MiB. Need to download 187 MiB.
After this operation, 0 B extra will be used (install 531 MiB, remove 531 MiB).
Is this ok [y/N]: y
[1/8] dotnet-hostfxr-9.0-0:9.0.4-1.fc42.x86_64 100% | 956.4 KiB/s | 142.5 KiB | 00m00s
[2/8] dotnet-host-0:9.0.4-1.fc42.x86_64 100% | 519.5 KiB/s | 225.5 KiB | 00m00s
[3/8] dotnet-apphost-pack-9.0-0:9.0.4-1.fc42.x86_64 100% | 5.6 MiB/s | 3.8 MiB | 00m01s
[4/8] dotnet-targeting-pack-9.0-0:9.0.4-1.fc42.x86_64 100% | 2.5 MiB/s | 3.0 MiB | 00m01s
[5/8] aspnetcore-targeting-pack-9.0-0:9.0.4-1.fc42.x86_64 100% | 1.6 MiB/s | 1.9 MiB | 00m01s
[6/8] dotnet-runtime-9.0-0:9.0.4-1.fc42.x86_64 100% | 15.0 MiB/s | 24.3 MiB | 00m02s
[7/8] aspnetcore-runtime-9.0-0:9.0.4-1.fc42.x86_64 100% | 2.6 MiB/s | 7.7 MiB | 00m03s
[8/8] dotnet-sdk-9.0-0:9.0.203-1.x86_64 100% | 24.6 MiB/s | 146.4 MiB | 00m06s
rpm -q -a aspnetcore\* dotnet\* | sort
aspnetcore-runtime-9.0-9.0.4-1.fc42.x86_64
aspnetcore-targeting-pack-9.0-9.0.4-1.fc42.x86_64
dotnet-apphost-pack-9.0-9.0.4-1.fc42.x86_64
dotnet-host-9.0.4-1.fc42.x86_64
dotnet-hostfxr-9.0-9.0.4-1.fc42.x86_64
dotnet-runtime-9.0-9.0.4-1.fc42.x86_64
dotnet-sdk-9.0-9.0.203-1.x86_64
dotnet-targeting-pack-9.0-9.0.4-1.fc42.x86_64
rpm -V -a aspnetcore\* dotnet\*
No results
dotnet --info
Host:
Version: 9.0.4
Architecture: x64
Commit: b7deac6d42
RID: fedora.42-x64
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.4 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.4 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Updating and loading repositories:
Repositories loaded.
Installed packages
dotnet-sdk-9.0.x86_64 9.0.203-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
Available packages
dotnet-sdk-9.0.x86_64 9.0.100-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
dotnet-sdk-9.0.x86_64 9.0.101-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
dotnet-sdk-9.0.x86_64 9.0.102-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
dotnet-sdk-9.0.x86_64 9.0.103-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
dotnet-sdk-9.0.x86_64 9.0.103-1.fc42 fedora
dotnet-sdk-9.0.x86_64 9.0.104-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
dotnet-sdk-9.0.x86_64 9.0.105-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
dotnet-sdk-9.0.x86_64 9.0.105-1.fc42 updates
dotnet-sdk-9.0.x86_64 9.0.200-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
dotnet-sdk-9.0.x86_64 9.0.201-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
dotnet-sdk-9.0.x86_64 9.0.202-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
dotnet-sdk-9.0.x86_64 9.0.203-1 packages.microsoft.com_yumrepos_microsoft-rhel9.0-prod
It’s an older SDK, my current project requires 9.0.203.
How would I solve that if I have to use the fedora package?
vgaetera
(Vladislav Grigoryev)
April 28, 2025, 9:10am
10
You need to prioritize Microsoft repos:
sudo dnf config-manager setopt \*microsoft\*.priority=1
sudo dnf distro-sync --allowerasing
Oh finally!!!
So if I understand correctly, my issue was I had sdk from microsoft and runtimes and other deps from fedora repo.
Not sure what caused it to break last week but I will double check when a new minor from dotnet comes out.
Thank you SO much for taking your time to help me with this issue!
.NET SDKs installed:
9.0.203 [/usr/share/dotnet/sdk]
1 Like