How to update phantomjs 1.9.8 to phantomjs 2.1.1 on ubuntu?

后端 未结 6 857
北恋
北恋 2021-02-02 16:54

I cant reinstall phantomjs 1.9.8 to 2.1.1 version on my ubuntu 16.04 Please help. 1.9.8 give me an errors when I write a spin functions, in documentation see that this ploblem

6条回答
  •  -上瘾入骨i
    2021-02-02 17:48

    So, jmunsch's answer works for me, but just to provide a clear and minimal recipe:

    export PHANTOM_JS_VERSION=2.1.1
    
    sudo apt-get install libfontconfig
    
    wget "https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$PHANTOM_JS_VERSION-linux-x86_64.tar.bz2"
    
    tar xvfj "./phantomjs-$PHANTOM_JS_VERSION-linux-x86_64.tar.bz2"
    
    ln -sf "$(pwd)/phantomjs-$PHANTOM_JS_VERSION-linux-x86_64/bin/phantomjs" "/usr/bin"
    

    The last line requires sudo because of /usr/bin, but you can put the symlink anywhere...

提交回复
热议问题