Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
phantomjs --version
@ballcheck

This comment has been minimized.

Copy link

ballcheck commented Feb 9, 2017

Thanks for this!

@ricardo

This comment has been minimized.

Copy link

ricardo commented Feb 12, 2017

Thank you! Saved me a lot of time.

@B-R-Bender

This comment has been minimized.

Copy link

B-R-Bender commented Feb 27, 2017

Nice hint! Everything works just fine!
This one help me to solve Error - Unable to load Atom 'execute_script' from file ':/ghostdriver/./third_party/webdriver-atoms/execute_script.js'
because of incorrect phantom installation via sudo apt-get install phantomjs

@sylinn

This comment has been minimized.

Copy link

sylinn commented Mar 1, 2017

Really helpful to me. Thanks! ^_^

@pyros2097

This comment has been minimized.

Copy link

pyros2097 commented Mar 4, 2017

Thanks works fine! 👍

@xaiborweb

This comment has been minimized.

Copy link

xaiborweb commented Mar 6, 2017

Please share how to install in centos 7

@rpalacios

This comment has been minimized.

Copy link

rpalacios commented Mar 22, 2017

Excelent!

@richlewis14

This comment has been minimized.

Copy link

richlewis14 commented Mar 27, 2017

useful guide, thank you...what would be the process to reverse this and uninstall...thanks

@floydkots

This comment has been minimized.

Copy link

floydkots commented Apr 12, 2017

Very useful guide. Thank you :-)

@poanchen

This comment has been minimized.

Copy link

poanchen commented Apr 29, 2017

Really useful. Thank you!!!

@webdevsyd

This comment has been minimized.

Copy link

webdevsyd commented May 22, 2017

Useful tutorial. Thank you very much

@jackyangNJ

This comment has been minimized.

Copy link

jackyangNJ commented Jul 8, 2017

Thanks! This saved me a lot of time.

@djones

This comment has been minimized.

Copy link

djones commented Jul 25, 2017

Thanks!

@dankoknad

This comment has been minimized.

Copy link

dankoknad commented Aug 5, 2017

Thank you!

@koladei

This comment has been minimized.

Copy link

koladei commented Aug 15, 2017

Thank you so much. This worked for me.

@monicaniet

This comment has been minimized.

Copy link

monicaniet commented Nov 7, 2017

I did all the steps but I get this: cannot executy binare file: Exec format error

@winnie334

This comment has been minimized.

Copy link

winnie334 commented Nov 15, 2017

Thanks, finally got phantomJS running after an hour of trying.

@agengdp

This comment has been minimized.

Copy link

agengdp commented Nov 16, 2017

Thank you

@sonjh1217

This comment has been minimized.

Copy link

sonjh1217 commented Nov 29, 2017

Thank you

@soluchok

This comment has been minimized.

Copy link

soluchok commented Dec 24, 2017

Thank you very much )

@clock21am

This comment has been minimized.

Copy link

clock21am commented Jan 3, 2018

Thank you so much for the gist

@alfchee

This comment has been minimized.

Copy link

alfchee commented Jan 11, 2018

Thanks a lot, very useful

@XianFeiXia

This comment has been minimized.

Copy link

XianFeiXia commented Jan 15, 2018

Thank you Very Much!

@kabeza

This comment has been minimized.

Copy link

kabeza commented Jan 30, 2018

Awesome! thanks!

@mjamilbashir99

This comment has been minimized.

Copy link

mjamilbashir99 commented Feb 15, 2018

Awesome! thanks!

@freeman3s

This comment has been minimized.

Copy link

freeman3s commented Feb 28, 2018

Thanks!

@peanutpi

This comment has been minimized.

Copy link

peanutpi commented Mar 3, 2018

Thanks

@SebastianVomMeer

This comment has been minimized.

Copy link

SebastianVomMeer commented Mar 13, 2018

👍

@SashaDesigN

This comment has been minimized.

Copy link

SashaDesigN commented Apr 9, 2018

Thanks)

@KonstantinSch

This comment has been minimized.

Copy link

KonstantinSch commented Apr 12, 2018

Thank you so much!

@velickym

This comment has been minimized.

Copy link

velickym commented Apr 21, 2018

Thanks a lot man

@bcfurtado

This comment has been minimized.

Copy link

bcfurtado commented May 3, 2018

Works like a charm!

@gustavonecore

This comment has been minimized.

Copy link

gustavonecore commented Jun 6, 2018

Thanks!!!!

@rubiadias

This comment has been minimized.

Copy link

rubiadias commented Jun 8, 2018

Thanks

@jbruni

This comment has been minimized.

Copy link

jbruni commented Jun 14, 2018

Useful, indeed.

@UbuntuEvangelist

This comment has been minimized.

Copy link

UbuntuEvangelist commented Jul 5, 2018

-bash: /usr/local/bin/phantomjs: cannot execute binary file: Exec format error
screenshot from 2018-07-05 17 40 30

@syedahaider97

This comment has been minimized.

Copy link

syedahaider97 commented Jul 31, 2018

Super helpful!

@LKkhadka

This comment has been minimized.

Copy link

LKkhadka commented Aug 31, 2018

it works on me..thx..

@cotillardq

This comment has been minimized.

Copy link

cotillardq commented Sep 27, 2018

Following these instruction I end up with

@prod:~$ phantomjs --version
-bash: /usr/bin/phantomjs: No such file or directory

@sagardere

This comment has been minimized.

Copy link

sagardere commented Nov 27, 2018

> gratefully thank you..

@ghost

This comment has been minimized.

Copy link

ghost commented Mar 8, 2019

Practical and objective! Helped me perfectly. And now I'm going to use it to automate creating a shell script! 👍

@tmorgan4

This comment has been minimized.

Copy link

tmorgan4 commented Apr 29, 2019

Still working great. Thanks!

@brandoncordell

This comment has been minimized.

Copy link

brandoncordell commented May 9, 2019

Thanks for these instructions. They worked well.

I did run into the same issue @cotillardq did on one of my servers so I just ran ln -sf /usr/local/bin/phantomjs /usr/bin which seemed to work fine.

@RayceeM

This comment has been minimized.

Copy link

RayceeM commented May 23, 2019

Helped me solve error can't find variable when running cljsbuild test in clojure..Perfect solution!thanks

@kzenman

This comment has been minimized.

Copy link

kzenman commented Sep 5, 2019

EXCELLENT! Tried 6 others and this the only one that worked on Ubuntu 18.04
THANK YOU!!!!

@DeniskasViskas

This comment has been minimized.

Copy link

DeniskasViskas commented Oct 1, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.