在CentOS上编译安装PhantomJS

安装PhantomJS必须环境

yum -y install gcc gcc-c++ make flex bison gperf ruby \
  openssl-devel freetype-devel fontconfig-devel libicu-devel sqlite-devel \
  libpng-devel libjpeg-devel

获取PhantomJS源码

git clone git://github.com/ariya/phantomjs.git
cd phantomjs
git checkout 2.1.4 #<version-number>
git submodule init
git submodule update

Python编译

python build.py

参考链接

Post Comment