zoukankan      html  css  js  c++  java
  • linux phantomjs 安装

    下载64位 phantomjs,我的机器是64位

    wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
    由于网络问题,附上百度云盘连接
    链接: https://pan.baidu.com/s/1Ourt2gN-zR8wh1Ecq0wrFg 提取码: q149

    解压文件

    [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/bin/phantomjs

    测试是否安装好(请重新打开一个终端)

    [~] phantomjs                                                                                                                                                                                             
    phantomjs> 

    ok...

    若出现

    phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

    请执行

    sudo apt-get install fontconfig
  • 相关阅读:
    QT:浮动的饼状统计图(自绘不规则窗口)
    在QTableView中使用各种自定义委托
    QT:使用“状态模式”绘制界面
    Linux IO控制命令生成
    C++ new和delete实现原理——new和delete最终调用malloc和free
    Qt中如何 编写插件 加载插件 卸载插件
    QT:用QSet储存自定义结构体的问题——QSet和STL的set是有本质区别的,QSet是基于哈希算法的,要求提供自定义==和qHash函数
    两种方法:VS2008下C++窗体程序显示控制台的方法——在QT程序中使用cout和cin
    把自定义控件集成到Qt Designer中
    关闭Windows 2008下面应用程序出错后的提示
  • 原文地址:https://www.cnblogs.com/dockers/p/10522107.html
Copyright © 2011-2022 走看看