標籤:pyspider
直接官網下載http://phantomjs.org/download.html
我的環境是64位:https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
解壓下檔案[email protected]:~# wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2[email protected]:~# tar xvf phantomjs-2.1.1-linux-x86_64.tar.bz2[email protected]:~# mv phantomjs-2.1.1-linux-x86_64 phantomjs[email protected]:~# mv phantomjs /usr/local/src/[email protected]:~# sudo ln -sf /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/phantomjs[email protected]:~# phantomjs phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory這個錯誤解決如下:[email protected]:~# 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[email protected]:~# phantomjs --version2.1.1完全解決了~!
本文出自 “joker” 部落格,請務必保留此出處http://jokerbug.blog.51cto.com/12943231/1945286
ubuntu phantomjs安裝(PhantomJS崩潰可以按這個重裝解決)