试图在ubuntu上编译dotnet代码并获得以下错误:
未能加载/usr/lib/dotnet/dotnet6-6.0.109/host/fxr/6.0.9/libhostfxr.so,错误:/home/ubuntu/anaconda3 3/lib/libstdc++.so.6: version `GLIBCXX_3.4.30‘not ( /usr/lib/dotnet/dotnet6-6.0.109/host/fxr/6.0.9/libhostfxr.so)要求找到库libhostfxr.so,但是从/usr/lib/dotnet/dotnet6-6.0.109/host/fxr/6.0.9/libhostfxr.so加载它失败了
dotnet -版本和dotnet -信息不起作用。
我该怎么解决这个问题?
发布于 2023-03-06 15:40:39
更新您的存储库并安装包含GCC的构建-基本,除其他外:
sudo apt update
sudo apt install build-essential
这个包依赖于g++
,它依赖于g++-11
,它依赖于libstdc++-11-dev
,它依赖于您想要的包libstdc++6
。
因此,您应该在C++上安装GNU C++库的共享对象。运行以下命令以查看受支持的版本及其指向的版本:
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
ls -la /usr/lib/x86_64-linux-gnu/libstdc++.so.6
根据需要更新符号链接。如有必要,请安装GCC工具链的旧版本。祝你好运。
最初张贴在这里:https://stackoverflow.com/questions/73836387/how-to-fix-glibcxx-3-4-30-not-found-in-ubuntu-22-04
https://askubuntu.com/questions/1432031
复制