error while loading shared libraries 的解决方法

这篇博客介绍了当Linux系统在运行程序时遇到`error while loading shared libraries: libpango_image.so: cannot open shared object file: No such file or directory`错误时的解决方法。内容包括检查`/etc/ld.so.conf`文件,将新的共享库目录`/usr/local/lib`添加到配置文件中,并执行`ldconfig`命令来更新链接器缓存,确保系统能找到所需的库文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 error while loading shared libraries: libpango_image.so: cannot open shared object file: No such file or directory

#cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
#sudo sh -c "echo '/usr/local/lib' >> /etc/ld.so.conf"
#cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf

/usr/local/lib
#sudo sh -c ldconfig

这个情况是共享库文件已经默认安装到了/usr/local/lib目录下面,在执行ldconfig命令前, 还要把新共享库目录加入到共享库配置文件/etc/ld.so.conf中。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值