Skip to content

PHP编译出错:error while loading shared libraries: libfreetype.so.6

2010 五月 15
by 荒野无灯
1
2
/home/soft/php_5_3_fpm/sapi/cli/php: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory
make: *** [ext/phar/phar.php] Error 127
1
2
/home/soft/php_5_3_fpm/sapi/cli/php: error while loading shared libraries: libpng14.so.14: cannot open shared object file: No such file or directory
make: *** [ext/phar/phar.phar] Error 127

由于我是编译安装freetype 、jpeg ,png ,gd 库的,因此,库文件默认是在 /usr/local/lib 下面。

1
--with-iconv-dir=/usr/local--with-freetype-dir=/usr/local  --with-jpeg-dir=/usr/local --with-png-dir=/usr/local

修改为:

1
--with-iconv-dir=/usr/local/lib --with-freetype-dir=/usr/local/lib  --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib

发现这样以后并没有作用。

于是做链接:

1
2
3
4
5
6
ln -s /usr/local/include/freetype2 /usr/include/
ln -s /usr/local/lib/libfree* /usr/lib/

ln -s /usr/local/lib/libpng* /usr/lib/

ln -s /usr/local/lib/libjpeg* /usr/lib/

这样就行了。

喜欢这篇文章吗?

请订阅本站 RSS feed填写您的邮件地址,订阅我们的精彩内容:,欢迎点击这里捐赠以支持荒野无灯转播到腾讯微博 转播到腾讯微博

作者:荒野无灯
出处:Hacklog【Hacklog】

声明: 本站遵循 署名-非商业性使用-相同方式共享 3.0 共享协议. 转载请注明转自Hacklog【荒野无灯weblog】

本文链接: http://ihacklog.com/?p=3806

3 Responses Post a comment
  1. Simon permalink
    六月 10, 2010

    荒野~,我一直找你,找不到能联系你的方式,急死我了,真的,我有个问题真的需要你帮忙,万分感谢:
    我装PHP,make出错,
    sapi/cli/php: error while loading shared libraries: libpng14.so.14: cannot open shared object file: No such file or directory
    make: *** [ext/phar/phar.phar] Error 127

    我看你的地方有解决的办法了,你是搞的链接,但我不知道在什么地方做链接,怎么做的,帮帮忙吧
    十万火急,希望你看到此信息后,联系我:
    Ph:15995447660,
    QQ:80106051
    小弟不胜感激~!

    • 六月 11, 2010

      libpng 共享库找不到,可能是你没有安装这个或者安装了但是PHP找不到。按照文章的方法做个链接应该可以了。

    • 六月 11, 2010

      PS:我的联系方式,在博客的about 里面写得非常清楚。

Leave a Reply

Allowed Tags - You may use these HTML tags and attributes in your comment.

<a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <q cite=""> <strong>

 :wink:  :-|  :-x  :twisted:  :)  8-O  :(  :roll:  :-P  :oops:  :-o  :mrgreen:  :lol:  :idea:  :-D  :evil:  :cry:  8)  :arrow:  :-?  :?:  :!:

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS