0

I have been trying to install dotnet in 2-3 different ways. I have tried the steps given on Microsoft's dotnet official page and some other ways that I have found on web. All the time after installation when I give dotnet --version command then it shows:

A fatal error occurred. The folder [/usr/share/dotnet/host/fxr] does not exist this error.

I am using Linux as my operating system. More information is given below:

Distributor ID: Ubuntu Description: Ubuntu 22.04.2 LTS Release: 22.04 Codename: jammy

The Steps i have followed to install dotnet is:

Step 1:

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb 

sudo dpkg -i packages-microsoft-prod.deb 

Step 2:

sudo apt install apt-transport-https 

sudo apt update 

sudo apt install dotnet-sdk-6.0 

Step 3:

sudo apt install apt-transport-https 

sudo apt update 

sudo apt install dotnet-runtime-6.0 

Step 4:

dotnet --version

After the final step, I get the error. With Other ways I always get the same error what should I do? I have also used snap install. But the snap install version has major problems in configuration. I wasn't able to work in a project with the snap install version.

Can anyone provide me with a full installation process that will work in my system?

Abidstic
  • 46
  • 4
  • Which arch is this, x64 or ARM64? – Martheen Mar 24 '23 at 12:20
  • Does this answer your question? [A fatal error occurred. The folder \[/usr/share/dotnet/host/fxr\] does not exist](https://stackoverflow.com/questions/73753672/a-fatal-error-occurred-the-folder-usr-share-dotnet-host-fxr-does-not-exist) – Martheen Mar 24 '23 at 12:27
  • *64 architecture and thanks for the the other link but it doesn't solve my problem – Abidstic Mar 24 '23 at 12:59
  • Can't replicate it on a fresh Ubuntu VM, if you can't nuke it try opening an issue in the dotnet github. – Martheen Mar 24 '23 at 13:09

1 Answers1

0

I have been manually checking all file paths that can possibly have any dotnet SDK files. I have removed all of them. Auto removes any kind of app that is related to dotnet then did a clean install. Normally when I gave the dotnet install 6.0 command is used to download the 6.0.406 version but this time it installed the 6.0.113 version. But now it works on my system.

If anyone has a similar problem try removing all dotnet files and then reinstalling it.

Twenty
  • 5,234
  • 4
  • 32
  • 67
Abidstic
  • 46
  • 4