(updated version of http://www.joyceleong.com/log/installing-phantomjs-on-ubuntu/)
export P=phantomjs-2.1.1-linux-x86_64
cd /usr/local/share
sudo curl -L -o $P.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/$P.tar.bz2
sudo tar xvf $P.tar.bz2
sudo ln --force -s /usr/local/share/$P /usr/local/share/phantomjs
sudo ln --force -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
phantomjs --version
ln: illegal option -- -
usage: ln [-Ffhinsv] source_file [target_file]
ln [-Ffhinsv] source_file ... target_dir
link source_file target_file
so I use
sudo ln -s /usr/local/share/$P /usr/local/share/phantomjs
without --force
in step 5 and 6
then when I run
step 7.
error
-bash: /usr/local/bin/phantomjs: cannot execute binary file
pls help