Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nasrulhazim/83f8aa898b008d023255b7fc8d584177 to your computer and use it in GitHub Desktop.
Save nasrulhazim/83f8aa898b008d023255b7fc8d584177 to your computer and use it in GitHub Desktop.
install PhantomJs 2.1.1 on Ubuntu 16.04

Just copy and paste the following codes and execute them.

cd /usr/local/share && wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 && tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2 && ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs && ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs && ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs && which phantomjs && phantomjs --version

You should get something like the following:

--2017-05-04 09:53:04--  https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Resolving bitbucket.org (bitbucket.org)... 104.192.143.1, 104.192.143.3, 104.192.143.2, ...
Connecting to bitbucket.org (bitbucket.org)|104.192.143.1|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=u8GHQzTSjkdTWfe8DQxP8o7OZA0%3D&Expires=1493893204&AWSAccessKeyId=AKIAIWZLQBE7J6CD7UJA&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22 [following]
--2017-05-04 09:53:05--  https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=u8GHQzTSjkdTWfe8DQxP8o7OZA0%3D&Expires=1493893204&AWSAccessKeyId=AKIAIWZLQBE7J6CD7UJA&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22
Resolving bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)... 52.216.66.40
Connecting to bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)|52.216.66.40|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23415665 (22M) [application/x-tar]
Saving to: 'phantomjs-2.1.1-linux-x86_64.tar.bz2'

phantomjs-2.1.1-linux-x86_64.tar.bz2    100%[==============================================================================>]  22.33M  1.02MB/s    in 40s     

2017-05-04 09:53:46 (566 KB/s) - 'phantomjs-2.1.1-linux-x86_64.tar.bz2' saved [23415665/23415665]

/usr/local/bin/phantomjs
2.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment