dotnet: Error: [/usr/lib/dotnet/host/fxr]
When running dotnet, you might get an error 'Error: [/usr/lib/dotnet/host/fxr]' in ubuntu 24:04 or other versions. To resolve this, please remove existing and then re-install dotnet again
sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*'
sudo rm -f /etc/apt/sources.list.d/ microsoft-prod.list
sudo apt update
sudo rm -f /etc/apt/sources.list.d/
sudo apt update
To install dotnet 8
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-8.0
To install dotnet9
sudo addsudo apt-get update && \ sudo apt-get install -y dotnet-sdk-9.0-apt-repository ppa:dotnet/backports
Comments