标签:pyspider
直接官网下载http://phantomjs.org/download.html
我的环境是64位:https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
解压下文件 root@ubuntu:~# wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 root@ubuntu:~# tar xvf phantomjs-2.1.1-linux-x86_64.tar.bz2 root@ubuntu:~# mv phantomjs-2.1.1-linux-x86_64 phantomjs root@ubuntu:~# mv phantomjs /usr/local/src/ root@ubuntu:~# sudo ln -sf /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/phantomjs root@ubuntu:~# phantomjs phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory 这个错误解决如下: root@ubuntu:~# sudo apt-get install build-essential g++ flex bison gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev libpng-dev libjpeg-dev python libx11-dev libxext-dev root@ubuntu:~# phantomjs --version 2.1.1 完全解决了~!
本文出自 “joker” 博客,请务必保留此出处http://jokerbug.blog.51cto.com/12943231/1945286
ubuntu phantomjs安装(PhantomJS崩溃可以按这个重装解决)
标签:pyspider
原文地址:http://jokerbug.blog.51cto.com/12943231/1945286