dotnet SDK not installing in Ubuntu 22.04
Asked Answered
M

2

5

I try to download dotnet SDK for C# with

sudo apt-get install -y dotnet6

but it says

A fatal error occurred. The folder [/usr/lib/dotnet/dotnet6-6.0.110/host/fxr] does not exist
Monotheism answered 23/10, 2022 at 20:30 Comment(5)
The following may be helpful: Install .NET on LinuxLambart
Is that one line the only output you get? If not, please add more output, preferably the entire output of the command if it's not too large.Intestinal
there is an installation script as a last resort situation.Allantois
The installation docs for 22.04 don't mention any dotnet6 package. It's either dotnet-sdk-6.0 for the full SDK or dotnet-runtime-6.0 for the runtime and aspnetcore-runtime-6.0 for ASP.NET Core applications. Did you follow theColumbarium
Does this answer your question? A fatal error occurred. The folder [/usr/share/dotnet/host/fxr] does not existItch
A
7

This worked for me.

sudo apt remove dotnet*
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt install -y dotnet6
Autotype answered 16/1, 2023 at 7:13 Comment(0)
W
0

If the Dotnet SDK is already installed on the system try the following it will help

sudo apt-get update 

then

sudo apt-get upgrade 

And if prompted yes or no choose yes for the .net framework otherwise if you don't know what you are doing choose no, that command is going to upgrade all your installed software and the kernel, so, be careful if you are relying on some old specific version of packages for your software to run

maybe it will ask you to restart

Way answered 11/1, 2023 at 8:42 Comment(2)
apt upgrade is dangerous, don'tJuliojulis
sudo apt-get upgrade is a 'guns on sparrows' approach for the given problem and does not guarantee to fix it. Please improve or delete your answer because it could lead to unwanted package-upgrades and possible further problems.Itch

© 2022 - 2024 — McMap. All rights reserved.