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

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填写您的邮件地址,订阅我们的精彩内容:

相关日志

回复 (3)

  1. Simon  / 回复

    荒野~,我一直找你,找不到能联系你的方式,急死我了,真的,我有个问题真的需要你帮忙,万分感谢:
    我装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
    小弟不胜感激~!

    • 荒野无灯  / 回复

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

    • 荒野无灯  / 回复

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

发表评论 修改评论取消编辑

允许使用的标签 - 您可以在评论中使用如下的 HTML 标签以及属性。

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

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

引用通告 (0)

› 尚无引用通告。

开灯