下载64位 phantomjs,我的机器是64位
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
解压文件
[downloads] tar -xvf phantomjs-2.1.1-linux-x86_64.tar.bz2 ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????11:29:10 phantomjs-2.1.1-linux-x86_64/phantomjs-2.1.1-linux-x86_64/examples/phantomjs-2.1.1-linux-x86_64/examples/colorwheel.jsphantomjs-2.1.1-linux-x86_64/examples/scandir.jsphantomjs-2.1.1-linux-x86_64/examples/page_events.jsphantomjs-2.1.1-linux-x86_64/examples/loadspeed.jsphantomjs-2.1.1-linux-x86_64/examples/injectme.jsphantomjs-2.1.1-linux-x86_64/examples/render_multi_url.jsphantomjs-2.1.1-linux-x86_64/examples/server.jsphantomjs-2.1.1-linux-x86_64/examples/netlog.jsphantomjs-2.1.1-linux-x86_64/examples/pagecallback.jsphantomjs-2.1.1-linux-x86_64/examples/module.jsphantomjs-2.1.1-linux-x86_64/examples/arguments.jsphantomjs-2.1.1-linux-x86_64/examples/universe.jsphantomjs-2.1.1-linux-x86_64/examples/openurlwithproxy.jsphantomjs-2.1.1-linux-x86_64/examples/sleepsort.jsphantomjs-2.1.1-linux-x86_64/examples/modernizr.jsphantomjs-2.1.1-linux-x86_64/examples/unrandomize.jsphantomjs-2.1.1-linux-x86_64/examples/hello.jsphantomjs-2.1.1-linux-x86_64/examples/stdin-stdout-stderr.jsphantomjs-2.1.1-linux-x86_64/examples/fibo.jsphantomjs-2.1.1-linux-x86_64/examples/phantomwebintro.jsphantomjs-2.1.1-linux-x86_64/examples/echoToFile.jsphantomjs-2.1.1-linux-x86_64/examples/post.jsphantomjs-2.1.1-linux-x86_64/examples/loadurlwithoutcss.jsphantomjs-2.1.1-linux-x86_64/examples/child_process-examples.jsphantomjs-2.1.1-linux-x86_64/examples/printenv.jsphantomjs-2.1.1-linux-x86_64/examples/useragent.jsphantomjs-2.1.1-linux-x86_64/examples/rasterize.jsphantomjs-2.1.1-linux-x86_64/examples/outputEncoding.jsphantomjs-2.1.1-linux-x86_64/examples/waitfor.jsphantomjs-2.1.1-linux-x86_64/examples/serverkeepalive.jsphantomjs-2.1.1-linux-x86_64/examples/postserver.jsphantomjs-2.1.1-linux-x86_64/examples/printmargins.jsphantomjs-2.1.1-linux-x86_64/examples/version.jsphantomjs-2.1.1-linux-x86_64/examples/run-qunit.jsphantomjs-2.1.1-linux-x86_64/examples/features.jsphantomjs-2.1.1-linux-x86_64/examples/netsniff.jsphantomjs-2.1.1-linux-x86_64/examples/walk_through_frames.jsphantomjs-2.1.1-linux-x86_64/examples/printheaderfooter.jsphantomjs-2.1.1-linux-x86_64/examples/responsive-screenshot.jsphantomjs-2.1.1-linux-x86_64/examples/countdown.jsphantomjs-2.1.1-linux-x86_64/examples/detectsniff.jsphantomjs-2.1.1-linux-x86_64/examples/simpleserver.jsphantomjs-2.1.1-linux-x86_64/examples/postjson.jsphantomjs-2.1.1-linux-x86_64/examples/run-jasmine2.jsphantomjs-2.1.1-linux-x86_64/examples/run-jasmine.jsphantomjs-2.1.1-linux-x86_64/README.mdphantomjs-2.1.1-linux-x86_64/LICENSE.BSDphantomjs-2.1.1-linux-x86_64/bin/phantomjs-2.1.1-linux-x86_64/bin/phantomjsphantomjs-2.1.1-linux-x86_64/third-party.txtphantomjs-2.1.1-linux-x86_64/ChangeLog
改名并移动到目录(根据个人行为爱好)
mv phantomjs-2.1.1-linux-x86_64 phantomjssudo mv phantomjs /usr/local/src/
建立软连接
sudo ln -sf /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
测试是否安装好(请重新打开一个终端)
[~] phantomjs ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????phantomjs>
ok...
linux phantomjs 安装
原文地址:https://www.cnblogs.com/dockers/p/10522107.html