linux phantomjs 安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux phantomjs 安装相关的知识,希望对你有一定的参考价值。
下载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.js phantomjs-2.1.1-linux-x86_64/examples/scandir.js phantomjs-2.1.1-linux-x86_64/examples/page_events.js phantomjs-2.1.1-linux-x86_64/examples/loadspeed.js phantomjs-2.1.1-linux-x86_64/examples/injectme.js phantomjs-2.1.1-linux-x86_64/examples/render_multi_url.js phantomjs-2.1.1-linux-x86_64/examples/server.js phantomjs-2.1.1-linux-x86_64/examples/netlog.js phantomjs-2.1.1-linux-x86_64/examples/pagecallback.js phantomjs-2.1.1-linux-x86_64/examples/module.js phantomjs-2.1.1-linux-x86_64/examples/arguments.js phantomjs-2.1.1-linux-x86_64/examples/universe.js phantomjs-2.1.1-linux-x86_64/examples/openurlwithproxy.js phantomjs-2.1.1-linux-x86_64/examples/sleepsort.js phantomjs-2.1.1-linux-x86_64/examples/modernizr.js phantomjs-2.1.1-linux-x86_64/examples/unrandomize.js phantomjs-2.1.1-linux-x86_64/examples/hello.js phantomjs-2.1.1-linux-x86_64/examples/stdin-stdout-stderr.js phantomjs-2.1.1-linux-x86_64/examples/fibo.js phantomjs-2.1.1-linux-x86_64/examples/phantomwebintro.js phantomjs-2.1.1-linux-x86_64/examples/echoToFile.js phantomjs-2.1.1-linux-x86_64/examples/post.js phantomjs-2.1.1-linux-x86_64/examples/loadurlwithoutcss.js phantomjs-2.1.1-linux-x86_64/examples/child_process-examples.js phantomjs-2.1.1-linux-x86_64/examples/printenv.js phantomjs-2.1.1-linux-x86_64/examples/useragent.js phantomjs-2.1.1-linux-x86_64/examples/rasterize.js phantomjs-2.1.1-linux-x86_64/examples/outputEncoding.js phantomjs-2.1.1-linux-x86_64/examples/waitfor.js phantomjs-2.1.1-linux-x86_64/examples/serverkeepalive.js phantomjs-2.1.1-linux-x86_64/examples/postserver.js phantomjs-2.1.1-linux-x86_64/examples/printmargins.js phantomjs-2.1.1-linux-x86_64/examples/version.js phantomjs-2.1.1-linux-x86_64/examples/run-qunit.js phantomjs-2.1.1-linux-x86_64/examples/features.js phantomjs-2.1.1-linux-x86_64/examples/netsniff.js phantomjs-2.1.1-linux-x86_64/examples/walk_through_frames.js phantomjs-2.1.1-linux-x86_64/examples/printheaderfooter.js phantomjs-2.1.1-linux-x86_64/examples/responsive-screenshot.js phantomjs-2.1.1-linux-x86_64/examples/countdown.js phantomjs-2.1.1-linux-x86_64/examples/detectsniff.js phantomjs-2.1.1-linux-x86_64/examples/simpleserver.js phantomjs-2.1.1-linux-x86_64/examples/postjson.js phantomjs-2.1.1-linux-x86_64/examples/run-jasmine2.js phantomjs-2.1.1-linux-x86_64/examples/run-jasmine.js phantomjs-2.1.1-linux-x86_64/README.md phantomjs-2.1.1-linux-x86_64/LICENSE.BSD phantomjs-2.1.1-linux-x86_64/bin/ phantomjs-2.1.1-linux-x86_64/bin/phantomjs phantomjs-2.1.1-linux-x86_64/third-party.txt phantomjs-2.1.1-linux-x86_64/ChangeLog
改名并移动到目录(根据个人行为爱好)
mv phantomjs-2.1.1-linux-x86_64 phantomjs sudo mv phantomjs /usr/local/src/
建立软连接
sudo ln -sf /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
测试是否安装好(请重新打开一个终端)
[~] phantomjs
phantomjs>
ok...
以上是关于linux phantomjs 安装的主要内容,如果未能解决你的问题,请参考以下文章
linux环境 安装chromedriver 和 phantomjs的方法