Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
Install these packages needed by PhantomJS to work correctly.
sudo apt-get install libfreetype6 libfreetype6-dev
sudo apt-get install libfontconfig1 libfontconfig1-dev
Get it from the PhantomJS website.
cd ~
export PHANTOM_JS="phantomjs-1.9.8-linux-x86_64"
wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
Once downloaded, move Phantomjs folder to /usr/local/share/
and create a symlink:
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
Now, It should have PhantomJS properly on your system.
phantomjs --version
On
Debian 10.3.0 Buster
I gotAutoconfiguration failed
:139743462616704: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 139743462616704:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 139743462616704:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf 139743462616704:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_confauto configuration
Solution:
open
/etc/ssl/openssl.cnf
and comment out the line under[default_conf]
(it is at the end of the config file):#ssl_conf = ssl_sect
I found this solution on this russian blog page. I guess if you are running OpenSSL version 1.1.1d you have to comment out this line to make it work.