【问题标题】:PhantomJS Install Centos 5.5PhantomJS 安装 Centos 5.5
【发布时间】:2015-03-29 21:32:01
【问题描述】:

我在运行 phantoms hello.js 语句时遇到错误。

phantomjs:加载共享库时出错:libfreetype.so.6:无法打开共享对象文件:没有这样的文件或目录

我已经检查了安装的模块(ldd phantomjs):

linux-gate.so.1 =>  (0xb7732000)
libfreetype.so.6 => not found
libfontconfig.so.1 => not found
libdl.so.2 => /lib/libdl.so.2 (0xb7722000)
librt.so.1 => /lib/librt.so.1 (0xb7719000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb76fd000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7612000)
libm.so.6 => /lib/libm.so.6 (0xb75e8000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb75ca000)
libc.so.6 => /lib/libc.so.6 (0xb7433000)
/lib/ld-linux.so.2 (0xb7733000)

如您所见,缺少两个库。所以我检查了this blog 解释错误。

yum install freetype => 结果 => 包 freetype-2.3.11-15.el6_6.1.x86_64 已安装且最新版本

yum install fontconfig => 结果 => 包 fontconfig-2.8.0-5.el6.x86_64 已安装且最新版本

但它仍然无法正常工作。怎么了....我不是 linux 专家。我正在运行 CentOS 6.4 版(最终版)

【问题讨论】:

  • 你的问题实际上解决了我的问题。谢谢!运行上面的命令后 phantomjs 对我有用。

标签: linux phantomjs


【解决方案1】:

一般来说,

yum provides libfreetype.so.6

然后安装正确的

例如

yum install freetype-2.4 或 yum install freetype 或 yum install freetype-freeworld 等。

对其他缺少的库执行相同的操作,一旦安装 freetype 就会弹出。

【讨论】:

    猜你喜欢
    • 2017-12-22
    • 2011-03-25
    • 2011-04-16
    • 2015-04-13
    • 2011-05-25
    • 2012-03-18
    • 2011-07-24
    • 2011-03-27
    • 2011-07-22
    相关资源
    最近更新 更多