undefined reference to `dladdr@GLIBC_2.34` 和 `std::__exception_ptr::exception_ptr::_M_rel

出现错误:

undefined reference to `dladdr@GLIBC_2.34`

原因:
系统的GLIBC的版本比较低
验证方法:
ldd --version 查看GLIBC的版本
解决方法:
升级GLIBC,参考:Ubuntu20.04更新GLIBC到2.35版本
运行的命令如下:
在/etc/apt/sources.list文件末尾增加:deb http://mirrors.aliyun.com/ubuntu/ jammy main
sudo apt update
sudo apt install libc6
这里会提示:
┌───────────────────────────────────────────┤ Configuring libc6
│ There are services installed on your system which need to be restarted when certain libraries, such as
│ libpam, libc, and libssl, are upgraded. Since these restarts may cause interruptions of service for the
│ system, you will normally be prompted on each upgrade for the list of services you wish to restart. You
│ can choose this option to avoid being prompted; instead, all necessary restarts will be done for you
│ automatically so you can avoid being asked questions on each library upgrade.

│ Restart services during package upgrades without asking?


重启是否需要提示,我选No
然今继续,后面有个提示不用改,OK
安装完后运行,sudo apt --fix-broken install
把之前的依赖关系重新整理下。
sudo ldconfig
然后ldd --version再查看下版本是否升级好了

上面只是安装了C库,C++库没有更新,
g++ --version
ld --version
查看相关的版本是否更新
如果还出现

`std::__exception_ptr::exception_ptr::_M_release()@CXXABI_1.3.13'

运行 strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep CXXABI
检查有没有对应的版本的ABI,没有的话安装升级C++标准库:
sudo apt install libstdc++6

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值