安装ImageMagick出现error while loading shared libraries的解决方法

yipeiwu_com6年前PHP代码库

本文实例讲述了安装安装ImageMagick出现error while loading shared libraries的解决方法。分享给大家供大家参考。具体解决方法如下:

运行程序时,如遇到像下列这种错误:

./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory

那就表示系统不知道xxx.so 放在哪个目录下。

这个时候就要在/etc/ld.so.conf中加入xxx.so所在的目录。

一般而言,有很多so档会在/usr/local/lib这个目录下,所以在/etc/ld.so.conf中加入/usr/local/lib这一行,可以解决此问题

将 /etc/ld.so.conf存档后,还要执行「/sbin/ldconfig –v」来更新一下才会生效

希望本文所述对大家有所帮助。

相关文章

使用session判断用户登录用户权限(超简单)

如下所示:复制代码 代码如下:<form action="#" method=post>用户名:<input type=text name=user><br...

php 清除网页病毒的方法

<?php Class clear_virus{ public $index ='b.html'; public $filepath =array('b.html'); publi...

解析php中两种缩放图片的函数,为图片添加水印

有两种改变图像大小的方法.(1):ImageCopyResized() 函数在所有GD版本中有效,但其缩放图像的算法比较粗糙.(2):ImageCopyResampled(),其像素插值...

php 使用post,get的一种简洁方式

近来看到了一个巧妙地方法,原理是 $var_a ='var_b'; $$var_a ='test'; 则echo $var_b;为'test' 因此可以这样处理 复制代码 代码如下: f...

php图像处理函数imagecopyresampled用法详解

本文实例讲述了php图像处理函数imagecopyresampled用法。分享给大家供大家参考,具体如下: 语法 复制代码 代码如下:bool imagecopyresampled (...