1.安裝phantomjs
ubuntu下sudo apt-get install phantomjs下載的不能用
—-下載程序文件
到官網下載
1.安裝phantomjs
—-下載程序文件
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
32位ubuntu下載鏈接是https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2。
—-解壓文件
tar -xvf phantomjs-1.9.7-linux-x86_64.tar.bz2
–將程序移到一個合適的位置
sudo mv phantomjs-1.9.7-linux-x86_64 /usr/local/src/phantomjs
—-創建軟鏈接到環境變量中。這樣可以直接在shell中使用phantomjs命令
sudo ln -sf /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
—-檢查是否正常工作
phantomjs
如果你看到當前版本號,即表示正常工作了。