Skip to content

Instantly share code, notes, and snippets.

@ianchen06
Last active April 13, 2019 09:26
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ianchen06/db12a2ecc7f1218f8e7e to your computer and use it in GitHub Desktop.
Save ianchen06/db12a2ecc7f1218f8e7e to your computer and use it in GitHub Desktop.
How to install PhantomJS on CentOS/RHEL
yum install fontconfig freetype freetype-devel fontconfig-devel libstdc++
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
tar -xjvf ~/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 --strip-components 1 /opt/phantomjs/
sudo yum install libffi-devel openssl-devel
pip install pyopenssl pyasn1
pip install requests[security]
@NabiKAZ
Copy link

NabiKAZ commented Jul 29, 2018

I thinks should be use --strip-components=1 -C /opt/phantomjs/ for tar command.
Finally maybe needed this command: ln -s /opt/phantomjs/bin/phantomjs /usr/bin/phantomjs
And also available 2.1.1 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment