完美解决linux编译动态库出现的问题:ERROR: ld.so: object LD_PRELOAD cannot be preloaded: ignored

报错记录:

 apt update
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
0% [Waiting for headers] [Waiting for headers] [Waiting for headers] [Waiting for headers]ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease                                   
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                         
Hit:4 https://storage.googleapis.com/bazel-apt stable InRelease     
Hit:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                                 
Hit:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease                                               
Ign:2 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64  InRelease
Ign:5 https://developer.download.nvidia.cn/compute/machine-learning/repos/ubuntu1804/x86_64  InRelease
Hit:8 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64  Release
Hit:9 https://developer.download.nvidia.cn/compute/machine-learning/repos/ubuntu1804/x86_64  Release
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object './libadd_c.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Reading package lists... Done

解决方法参考:https://stackoverflow.com/questions/17723666/error-ld-so-object-ld-preload-cannot-be-preloaded-ignored
只需一行命令:

unset LD_PRELOAD

再次更新完美解决:

/usr/lib# unset LD_PRELOAD
root@ee356da1bbe1:/usr/lib# apt update
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease                                   
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                         
Hit:5 https://storage.googleapis.com/bazel-apt stable InRelease                                                                             
Hit:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                                                       
Ign:1 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64  InRelease
Hit:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Ign:4 https://developer.download.nvidia.cn/compute/machine-learning/repos/ubuntu1804/x86_64  InRelease
Hit:8 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64  Release
Hit:10 https://developer.download.nvidia.cn/compute/machine-learning/repos/ubuntu1804/x86_64  Release
Reading package lists... Done
Building dependency tree       
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

源代码杀手

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值