how to install phantomjs

Hi, I already have downloaded the file “phantomjs-2.1.1-linux-x86_64.tar.bz2” and upon executing this command: “tar xvf phantomjs-2.1.1-linux-x86_64.tar.bz2” I get this: “tar: phantomjs-2.1.1-linux-x86_64.tar.bz2: cannot open: No such file or directory” When I do “ls”, this is what I see: conf mail phantomjs-2.1.1-linux-x86_64.tar.bz2 temp web

So, I have it downloaded but I’m not able to install it. As you can tell, I’m a newbie and appreciate any help.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @fredj ,

Try this command:

tar -xvf phantomjs-2.1.1-linux-x86_64.tar.bz2

Maybe you executed the wrong command.Here is also one step you need to do to create soft links:

#move the files to a place you like

sudo mv phantomjs-2.1.1-linux-x86_64 /usr/local/src/phantomjs

#create soft links

sudo ln -sf /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/phantomjs

This way you can use the phantomjs command directly in the shell. Then we check:


If you can see version number,this program is working.

Regards, Shiroka