Trying to compile dotnet code on ubuntu and get this error:
Failed to load /usr/lib/dotnet/dotnet6-6.0.109/host/fxr/6.0.9/libhostfxr.so, error: /home/ubuntu/anaconda3/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/dotnet/dotnet6-6.0.109/host/fxr/6.0.9/libhostfxr.so) The library libhostfxr.so was found, but loading it from /usr/lib/dotnet/dotnet6-6.0.109/host/fxr/6.0.9/libhostfxr.so failed
- Installing .NET prerequisites might help resolve this problem. https://go.microsoft.com/fwlink/?linkid=2063370
dotnet --version and dotnet --info do not work.
How do I fix this?
/home/ubuntu/anaconda3/lib/libstdc++.so.6
instead of the system'slibstdc++.so.6
? – steeldriver Sep 24 '22 at 13:12dpkg -l | grep dotnet
then doingsudo apt remove <dotnetname>
listed by dpkg. – Terrance Sep 25 '22 at 00:04