BetterJS / doc

Description of badjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

phantomjs 安装不成功

caihuiji opened this issue · comments

badjs-web 的邮件模块需要 phantomjs 生成图表,但是被GFW 给墙了,很难下载成功。
可以使用下面的镜像自行安装到linux 中:

http://npm.taobao.org/dist/phantomjs/

请安装 1.9.8 版本。安装成功后,再 npm phantomjs 会检测到已安装成功就不会下载了。

如果是 linux , 还需要配置 phantomjs 命令,否则 npm 检测不到已经安装了 phantomjs

如果运行的 phantomjs -v 出现以下错误:

bin/phantomjs: error while loading shared libraries: libfontconfig.so.1:
 cannot open shared object file: No such file or directorybin/phantomjs: error while loading 
shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

请在下面相对应的linux版本 运行以下命令
ubuntu
sudo apt-get install libfontconfig

centos
yum install libXext libXrender fontconfig libfontconfig.so.1

运行通过,将phantomjs 设置为全局的命令。

建议用docker版本,省事。

@liyatang 有docker 哈, 部署文档里面有写, 亲~
https://github.com/BetterJS/doc#docker-部署

@caihuiji 看错了,我以为楼主(没注意到是作者)在问phantomjs的安装失败问题,建议他用docker版本。
docker版本的提供一开始还是我提出来的。 哈哈。
看到把我的评论3了吧

@caihuiji
docker版本我跟@caihuiji提了1年多,他说肯定没人用,直到几个人提issue叫他弄docker版本= =

建议用docker版本,省事。

docker 版本太旧了

如果运行的 phantomjs -v 出现以下错误:

bin/phantomjs: error while loading shared libraries: libfontconfig.so.1:
 cannot open shared object file: No such file or directorybin/phantomjs: error while loading 
shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

请在下面相对应的linux版本 运行以下命令
ubuntu
sudo apt-get install libfontconfig

centos
yum install libXext libXrender fontconfig libfontconfig.so.1

运行通过,将phantomjs 设置为全局的命令。

try yum install fontconfig
this works for us.