Skip to content

Instantly share code, notes, and snippets.

@telbiyski
Last active May 17, 2023 06:40
Show Gist options
  • Save telbiyski/ec56a92d7114b8631c906c18064ce620 to your computer and use it in GitHub Desktop.
Save telbiyski/ec56a92d7114b8631c906c18064ce620 to your computer and use it in GitHub Desktop.
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
@SashaDesigN
Copy link

Thanks)

@KonstantinSch
Copy link

Thank you so much!

@velickym
Copy link

Thanks a lot man

@bcfurtado
Copy link

Works like a charm!

@gustavonecore
Copy link

Thanks!!!!

@rubiadias
Copy link

Thanks

@jbruni
Copy link

jbruni commented Jun 14, 2018

Useful, indeed.

@UbuntuEvangelist
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
Copy link

Super helpful!

@LKkhadka
Copy link

it works on me..thx..

@cotillardq
Copy link

Following these instruction I end up with

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

@sagardere
Copy link

> gratefully thank you..

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
Copy link

Still working great. Thanks!

@brandoncordell
Copy link

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
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
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
Copy link

Thanks!

@FrankApiyo
Copy link

thank you!

@Parmarno
Copy link

Thank you very much !!!

@cassiofelippe
Copy link

Thanks!

@Gr-Fr
Copy link

Gr-Fr commented Jun 5, 2020

Thanks!

@navneet8007
Copy link

Thanks

@hsteinshiromoto
Copy link

Hi,

For me I get an error in the last command:

$ phantomjs --version
Auto configuration failed
140090869620352:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
140090869620352:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
140090869620352:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
140090869620352:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

Would someone know the reason of this problem?

@tristan-mastrodicasa
Copy link

Hi,

For me I get an error in the last command:

$ phantomjs --version
Auto configuration failed
140090869620352:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
140090869620352:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
140090869620352:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
140090869620352:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

Would someone know the reason of this problem?

Same issue for me

@tristan-mastrodicasa
Copy link

Solved by running

export OPENSSL_CONF=/etc/ssl/

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