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?