Skip to content

Instantly share code, notes, and snippets.

@julionc
Last active June 7, 2024 11:29
Show Gist options
  • Save julionc/7476620 to your computer and use it in GitHub Desktop.
Save julionc/7476620 to your computer and use it in GitHub Desktop.
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

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
#!/usr/bin/env bash
# This script install PhantomJS in your Debian/Ubuntu System
#
# This script must be run as root:
# sudo sh install_phantomjs.sh
#
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
PHANTOM_VERSION="phantomjs-1.9.8"
ARCH=$(uname -m)
if ! [ $ARCH = "x86_64" ]; then
$ARCH="i686"
fi
PHANTOM_JS="$PHANTOM_VERSION-linux-$ARCH"
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 ~
wget https://bitbucket.org/ariya/phantomjs/downloads/$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
@aleenprd
Copy link

Thank youuu!

Copy link

ghost commented Jun 14, 2022

useful guide,
although I did ended up migrating to https://github.com/puppeteer/puppeteer .

@Mgavahi
Copy link

Mgavahi commented Aug 17, 2022

Hi, I installed phantomjs in ubuntu 22.04 and when use it in Rstudio for my code get Auto configuration failed error. i readed all comment and use all of them for resolving this error but don't worked!!!

@Neo-Desktop
Copy link

here's a slightly better and fully automated version of that script in the original post and adds the automatic version downloading snippet from here

#!/usr/bin/env bash
# This script install PhantomJS in your Debian/Ubuntu System
#
# This script must be run as root:
# sudo sh install_phantomjs.sh
#

if [[ $EUID -ne 0 ]]; then
	echo "This script must be run as root" 1>&2
	exit 1
fi

PHANTOM_JS_LATEST=$(curl -s https://bitbucket.org/ariya/phantomjs/downloads/ | grep -i -e zip -e bz2 | grep -vi beta | grep -i linux-x86_64 | grep -v symbols | cut -d '>' -f 2 | cut -d '<' -f 1 | head -n 1)
PHANTOM_VERSION=${PHANTOM_JS_LATEST%-*-*.*.*}
ARCH=$(uname -m)

if ! [ $ARCH = "x86_64" ]; then
	$ARCH="i686"
fi

PHANTOM_JS="$PHANTOM_VERSION-linux-$ARCH"

apt-get update
apt-get -y install build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev

cd ~
wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
tar xvjf $PHANTOM_JS.tar.bz2

mv $PHANTOM_JS /usr/local/share
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin

@ecc256
Copy link

ecc256 commented Sep 1, 2022

@Neo-Desktop

if ! [ $ARCH = "x86_64" ]; then
	$ARCH="i686"
fi

Ouch...
How does it work for "arm64" architecture?

@ecc256
Copy link

ecc256 commented Sep 1, 2022

Anybody have luck with ubuntu 22.04/arm64?

@mauro-miatello
Copy link

Anybody have luck with ubuntu 22.04/arm64?

nope, I've same problem

@antonellosalis
Copy link

It is very strange for me.
I installed, the phantomjes --version shows 2.1.1 but it have no effect...still the message appears on my shiny app.

@tpongo-afk
Copy link

To solve the Auto configuration failed error see this issue
Type this in the terminal before executing phantomjs: export OPENSSL_CONF=/etc/ssl

@erfangnu
Copy link

root@maxbasecode:/tmp/sub/Sudomy# sudo apt-get install build-essential chrpath libssl-dev libxft-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
The following additional packages will be installed:
  libbrotli-dev libfontconfig-dev libfontconfig1-dev libfreetype-dev libfreetype6-dev libpng-dev libpng-tools libpthread-stubs0-dev
  libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxrender-dev pkg-config uuid-dev x11proto-dev xorg-sgml-doctools xtrans-dev
Suggested packages:
  freetype2-doc libssl-doc libx11-doc libxcb-doc
The following NEW packages will be installed:
  chrpath libbrotli-dev libfontconfig-dev libfontconfig1-dev libfreetype-dev libfreetype6-dev libpng-dev libpng-tools
  libpthread-stubs0-dev libssl-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxft-dev libxrender-dev pkg-config uuid-dev
  x11proto-dev xorg-sgml-doctools xtrans-dev
0 upgraded, 21 newly installed, 0 to remove and 19 not upgraded.
Need to get 5,312 kB of archives.
After this operation, 22.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://mirror.hetzner.com/ubuntu/packages jammy/universe arm64 chrpath arm64 0.16-2 [12.1 kB]
Get:2 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libbrotli-dev arm64 1.0.9-2build6 [336 kB]
Get:3 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libpng-dev arm64 1.6.37-3build5 [194 kB]
Get:4 https://mirror.hetzner.com/ubuntu/packages jammy-updates/main arm64 libfreetype-dev arm64 2.11.1+dfsg-1ubuntu0.2 [556 kB]
Get:5 https://mirror.hetzner.com/ubuntu/packages jammy-updates/main arm64 libfreetype6-dev arm64 2.11.1+dfsg-1ubuntu0.2 [8,288 B]
Get:6 https://mirror.hetzner.com/ubuntu/packages jammy-updates/main arm64 uuid-dev arm64 2.37.2-4ubuntu3.4 [33.9 kB]
Get:7 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 pkg-config arm64 0.29.2-1ubuntu3 [47.4 kB]
Get:8 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libfontconfig-dev arm64 2.13.1-4.2ubuntu5 [154 kB]
Get:9 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libfontconfig1-dev arm64 2.13.1-4.2ubuntu5 [1,836 B]
Get:10 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libpng-tools arm64 1.6.37-3build5 [28.6 kB]
Get:11 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libpthread-stubs0-dev arm64 0.4-1build2 [5,496 B]
Get:12 https://mirror.hetzner.com/ubuntu/packages jammy-updates/main arm64 libssl-dev arm64 3.0.2-0ubuntu1.15 [2,297 kB]
Get:13 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 xorg-sgml-doctools all 1:1.11-1.1 [10.9 kB]
Get:14 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 x11proto-dev all 2021.5-1 [604 kB]
Get:15 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libxau-dev arm64 1:1.0.9-1build5 [10.1 kB]
Get:16 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libxdmcp-dev arm64 1:1.1.3-0ubuntu5 [26.4 kB]
Get:17 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 xtrans-dev all 1.4.0-1 [68.9 kB]
Get:18 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libxcb1-dev arm64 1.14-3ubuntu3 [90.6 kB]
Get:19 https://mirror.hetzner.com/ubuntu/packages jammy-updates/main arm64 libx11-dev arm64 2:1.7.5-1ubuntu0.3 [746 kB]
Get:20 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libxrender-dev arm64 1:0.9.10-1build4 [26.4 kB]
Get:21 https://mirror.hetzner.com/ubuntu/packages jammy/main arm64 libxft-dev arm64 2.3.4-1 [53.4 kB]
Fetched 5,312 kB in 0s (11.8 MB/s)
Selecting previously unselected package chrpath.
(Reading database ... 95070 files and directories currently installed.)
Preparing to unpack .../00-chrpath_0.16-2_arm64.deb ...
Unpacking chrpath (0.16-2) ...
Selecting previously unselected package libbrotli-dev:arm64.
Preparing to unpack .../01-libbrotli-dev_1.0.9-2build6_arm64.deb ...
Unpacking libbrotli-dev:arm64 (1.0.9-2build6) ...
Selecting previously unselected package libpng-dev:arm64.
Preparing to unpack .../02-libpng-dev_1.6.37-3build5_arm64.deb ...
Unpacking libpng-dev:arm64 (1.6.37-3build5) ...
Selecting previously unselected package libfreetype-dev:arm64.
Preparing to unpack .../03-libfreetype-dev_2.11.1+dfsg-1ubuntu0.2_arm64.deb ...
Unpacking libfreetype-dev:arm64 (2.11.1+dfsg-1ubuntu0.2) ...
Selecting previously unselected package libfreetype6-dev:arm64.
Preparing to unpack .../04-libfreetype6-dev_2.11.1+dfsg-1ubuntu0.2_arm64.deb ...
Unpacking libfreetype6-dev:arm64 (2.11.1+dfsg-1ubuntu0.2) ...
Selecting previously unselected package uuid-dev:arm64.
Preparing to unpack .../05-uuid-dev_2.37.2-4ubuntu3.4_arm64.deb ...
Unpacking uuid-dev:arm64 (2.37.2-4ubuntu3.4) ...
Selecting previously unselected package pkg-config.
Preparing to unpack .../06-pkg-config_0.29.2-1ubuntu3_arm64.deb ...
Unpacking pkg-config (0.29.2-1ubuntu3) ...
Selecting previously unselected package libfontconfig-dev:arm64.
Preparing to unpack .../07-libfontconfig-dev_2.13.1-4.2ubuntu5_arm64.deb ...
Unpacking libfontconfig-dev:arm64 (2.13.1-4.2ubuntu5) ...
Selecting previously unselected package libfontconfig1-dev:arm64.
Preparing to unpack .../08-libfontconfig1-dev_2.13.1-4.2ubuntu5_arm64.deb ...
Unpacking libfontconfig1-dev:arm64 (2.13.1-4.2ubuntu5) ...
Selecting previously unselected package libpng-tools.
Preparing to unpack .../09-libpng-tools_1.6.37-3build5_arm64.deb ...
Unpacking libpng-tools (1.6.37-3build5) ...
Selecting previously unselected package libpthread-stubs0-dev:arm64.
Preparing to unpack .../10-libpthread-stubs0-dev_0.4-1build2_arm64.deb ...
Unpacking libpthread-stubs0-dev:arm64 (0.4-1build2) ...
Selecting previously unselected package libssl-dev:arm64.
Preparing to unpack .../11-libssl-dev_3.0.2-0ubuntu1.15_arm64.deb ...
Unpacking libssl-dev:arm64 (3.0.2-0ubuntu1.15) ...
Selecting previously unselected package xorg-sgml-doctools.
Preparing to unpack .../12-xorg-sgml-doctools_1%3a1.11-1.1_all.deb ...
Unpacking xorg-sgml-doctools (1:1.11-1.1) ...
Selecting previously unselected package x11proto-dev.
Preparing to unpack .../13-x11proto-dev_2021.5-1_all.deb ...
Unpacking x11proto-dev (2021.5-1) ...
Selecting previously unselected package libxau-dev:arm64.
Preparing to unpack .../14-libxau-dev_1%3a1.0.9-1build5_arm64.deb ...
Unpacking libxau-dev:arm64 (1:1.0.9-1build5) ...
Selecting previously unselected package libxdmcp-dev:arm64.
Preparing to unpack .../15-libxdmcp-dev_1%3a1.1.3-0ubuntu5_arm64.deb ...
Unpacking libxdmcp-dev:arm64 (1:1.1.3-0ubuntu5) ...
Selecting previously unselected package xtrans-dev.
Preparing to unpack .../16-xtrans-dev_1.4.0-1_all.deb ...
Unpacking xtrans-dev (1.4.0-1) ...
Selecting previously unselected package libxcb1-dev:arm64.
Preparing to unpack .../17-libxcb1-dev_1.14-3ubuntu3_arm64.deb ...
Unpacking libxcb1-dev:arm64 (1.14-3ubuntu3) ...
Selecting previously unselected package libx11-dev:arm64.
Preparing to unpack .../18-libx11-dev_2%3a1.7.5-1ubuntu0.3_arm64.deb ...
Unpacking libx11-dev:arm64 (2:1.7.5-1ubuntu0.3) ...
Selecting previously unselected package libxrender-dev:arm64.
Preparing to unpack .../19-libxrender-dev_1%3a0.9.10-1build4_arm64.deb ...
Unpacking libxrender-dev:arm64 (1:0.9.10-1build4) ...
Selecting previously unselected package libxft-dev:arm64.
Preparing to unpack .../20-libxft-dev_2.3.4-1_arm64.deb ...
Unpacking libxft-dev:arm64 (2.3.4-1) ...
Setting up libpng-tools (1.6.37-3build5) ...
Setting up libpng-dev:arm64 (1.6.37-3build5) ...
Setting up libpthread-stubs0-dev:arm64 (0.4-1build2) ...
Setting up xtrans-dev (1.4.0-1) ...
Setting up uuid-dev:arm64 (2.37.2-4ubuntu3.4) ...
Setting up libssl-dev:arm64 (3.0.2-0ubuntu1.15) ...
Setting up pkg-config (0.29.2-1ubuntu3) ...
Setting up xorg-sgml-doctools (1:1.11-1.1) ...
Setting up libbrotli-dev:arm64 (1.0.9-2build6) ...
Setting up chrpath (0.16-2) ...
Setting up x11proto-dev (2021.5-1) ...
Setting up libxau-dev:arm64 (1:1.0.9-1build5) ...
Setting up libfreetype-dev:arm64 (2.11.1+dfsg-1ubuntu0.2) ...
Setting up libxdmcp-dev:arm64 (1:1.1.3-0ubuntu5) ...
Setting up libxcb1-dev:arm64 (1.14-3ubuntu3) ...
Setting up libfontconfig-dev:arm64 (2.13.1-4.2ubuntu5) ...
Setting up libx11-dev:arm64 (2:1.7.5-1ubuntu0.3) ...
Setting up libfreetype6-dev:arm64 (2.11.1+dfsg-1ubuntu0.2) ...
Setting up libxrender-dev:arm64 (1:0.9.10-1build4) ...
Setting up libxft-dev:arm64 (2.3.4-1) ...
Setting up libfontconfig1-dev:arm64 (2.13.1-4.2ubuntu5) ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...
Scanning candidates...
sudo apt-get install libfreetype6 libfreetype6-dev============================================================                             ]
sudo apt-get install libfontconfig1 libfontconfig1-dev
Scanning linux images... [=================================================================================================================]
Scanning linux images...

Restarting services...
Service restarts being deferred:
 systemctl restart networkd-dispatcher.service
 systemctl restart unattended-upgrades.service

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.







root@maxbasecode:/tmp/sub/Sudomy# sudo apt-get install libfreetype6 libfreetype6-dev
sudo apt-get install libfontconfig1 libfontconfig1-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libfreetype6 is already the newest version (2.11.1+dfsg-1ubuntu0.2).
libfreetype6 set to manually installed.
libfreetype6-dev is already the newest version (2.11.1+dfsg-1ubuntu0.2).
libfreetype6-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libfontconfig1 is already the newest version (2.13.1-4.2ubuntu5).
libfontconfig1 set to manually installed.
libfontconfig1-dev is already the newest version (2.13.1-4.2ubuntu5).
libfontconfig1-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
root@maxbasecode:/tmp/sub/Sudomy# 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
--2024-05-30 16:07:06--  https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
Resolving bitbucket.org (bitbucket.org)... 2406:da00:ff00::22cd:e0db, 2406:da00:ff00::22c0:3470, 2406:da00:ff00::22c5:2ef4, ...
Connecting to bitbucket.org (bitbucket.org)|2406:da00:ff00::22cd:e0db|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://bbuseruploads.s3.amazonaws.com/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2?response-content-disposition=attachment%3B%20filename%3D%22phantomjs-1.9.8-linux-x86_64.tar.bz2%22&AWSAccessKeyId=ASIA6KOSE3BNCS4F6RDY&Signature=D%2FTxGSOTd%2BDpurWFbFawCUKSVJs%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEKj%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIQDOvlmXmIndQ3zhgnBTMh98zA3zTVhE2dDwoFkK%2F7jizwIge5u5dcaSF7OBzHmngkxMyvogAQdJLu87Gp3sgRHfS4UqpwIIMRAAGgw5ODQ1MjUxMDExNDYiDKxKTPpcGA8B%2BF2k1CqEAkNDSG03ynw5gvGE5olBa6JwNGPlTyLixvTv%2FOUlRRSGIb23eIovY9s6KMyv2SToTsZJdOQ%2FQQQRaWQY0ujcduYXAN6mXh2d7kYb6uQUJVFSQ7HFfhJ4MNvAbvrakDd%2FlfpOsdS%2BhTHkoGB1evZY8Y9MxEgAXPLHJrWZM%2Fgc4phXf%2Bk7K4XxyZeJlJ2tBTn7k3GA2oPBYJPofGKZ7LChAMXJWkX3LJD9k36G3MOqLhiJ2AVuet6HhDQ16lkQtCCn%2FJnGZC2ggdorsgDJx1%2BLaV9C79uueifbC8vS5Q1eO0e1m%2BnZhk6Zs%2FKs%2FuI0dMhCPzJCRg9L7cr4i3RPmr113N96ju3PMInE4rIGOp0B%2BV91SM46hyBZMquRlHePVoV4KxfnSPH3B0F%2FNyn8k5mTo8Zz7Ee9NPtpmUwELbBHOi9mPqL3XM5nabISe78F5pgvgaYxb5c9uZ%2BCNG5tSbN3JntN%2FE%2F9vpbuSH%2BHPVvnZwaJMUPLZw1mY1JX0gfe1kXAXcrnBkheoXH9l41ncEOMDMinPnqerWR8BdELuxKTZMOFPLsRah3APz2smQ%3D%3D&Expires=1717086481 [following]
--2024-05-30 16:07:06--  https://bbuseruploads.s3.amazonaws.com/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2?response-content-disposition=attachment%3B%20filename%3D%22phantomjs-1.9.8-linux-x86_64.tar.bz2%22&AWSAccessKeyId=ASIA6KOSE3BNCS4F6RDY&Signature=D%2FTxGSOTd%2BDpurWFbFawCUKSVJs%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEKj%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIQDOvlmXmIndQ3zhgnBTMh98zA3zTVhE2dDwoFkK%2F7jizwIge5u5dcaSF7OBzHmngkxMyvogAQdJLu87Gp3sgRHfS4UqpwIIMRAAGgw5ODQ1MjUxMDExNDYiDKxKTPpcGA8B%2BF2k1CqEAkNDSG03ynw5gvGE5olBa6JwNGPlTyLixvTv%2FOUlRRSGIb23eIovY9s6KMyv2SToTsZJdOQ%2FQQQRaWQY0ujcduYXAN6mXh2d7kYb6uQUJVFSQ7HFfhJ4MNvAbvrakDd%2FlfpOsdS%2BhTHkoGB1evZY8Y9MxEgAXPLHJrWZM%2Fgc4phXf%2Bk7K4XxyZeJlJ2tBTn7k3GA2oPBYJPofGKZ7LChAMXJWkX3LJD9k36G3MOqLhiJ2AVuet6HhDQ16lkQtCCn%2FJnGZC2ggdorsgDJx1%2BLaV9C79uueifbC8vS5Q1eO0e1m%2BnZhk6Zs%2FKs%2FuI0dMhCPzJCRg9L7cr4i3RPmr113N96ju3PMInE4rIGOp0B%2BV91SM46hyBZMquRlHePVoV4KxfnSPH3B0F%2FNyn8k5mTo8Zz7Ee9NPtpmUwELbBHOi9mPqL3XM5nabISe78F5pgvgaYxb5c9uZ%2BCNG5tSbN3JntN%2FE%2F9vpbuSH%2BHPVvnZwaJMUPLZw1mY1JX0gfe1kXAXcrnBkheoXH9l41ncEOMDMinPnqerWR8BdELuxKTZMOFPLsRah3APz2smQ%3D%3D&Expires=1717086481
Resolving bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)... 52.216.214.33, 16.182.97.41, 52.217.121.241, ...
Connecting to bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)|52.216.214.33|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13163325 (13M) [application/x-tar]
Saving to: ‘phantomjs-1.9.8-linux-x86_64.tar.bz2’

phantomjs-1.9.8-linux-x86_64.tar.b 100%[================================================================>]  12.55M  12.0MB/s    in 1.0s

2024-05-30 16:07:08 (12.0 MB/s) - ‘phantomjs-1.9.8-linux-x86_64.tar.bz2’ saved [13163325/13163325]

phantomjs-1.9.8-linux-x86_64/
phantomjs-1.9.8-linux-x86_64/bin/
phantomjs-1.9.8-linux-x86_64/bin/phantomjs
phantomjs-1.9.8-linux-x86_64/examples/
phantomjs-1.9.8-linux-x86_64/examples/scandir.js
phantomjs-1.9.8-linux-x86_64/examples/technews.coffee
phantomjs-1.9.8-linux-x86_64/examples/tweets.js
phantomjs-1.9.8-linux-x86_64/examples/rasterize.coffee
phantomjs-1.9.8-linux-x86_64/examples/pagecallback.js
phantomjs-1.9.8-linux-x86_64/examples/printheaderfooter.js
phantomjs-1.9.8-linux-x86_64/examples/follow.js
phantomjs-1.9.8-linux-x86_64/examples/run-jasmine.coffee
phantomjs-1.9.8-linux-x86_64/examples/module.js
phantomjs-1.9.8-linux-x86_64/examples/waitfor.coffee
phantomjs-1.9.8-linux-x86_64/examples/stdin-stdout-stderr.coffee
phantomjs-1.9.8-linux-x86_64/examples/pizza.js
phantomjs-1.9.8-linux-x86_64/examples/seasonfood.coffee
phantomjs-1.9.8-linux-x86_64/examples/unrandomize.js
phantomjs-1.9.8-linux-x86_64/examples/modernizr.js
phantomjs-1.9.8-linux-x86_64/examples/waitfor.js
phantomjs-1.9.8-linux-x86_64/examples/direction.js
phantomjs-1.9.8-linux-x86_64/examples/arguments.coffee
phantomjs-1.9.8-linux-x86_64/examples/render_multi_url.js
phantomjs-1.9.8-linux-x86_64/examples/run-qunit.js
phantomjs-1.9.8-linux-x86_64/examples/printheaderfooter.coffee
phantomjs-1.9.8-linux-x86_64/examples/ipgeocode.js
phantomjs-1.9.8-linux-x86_64/examples/ipgeocode.coffee
phantomjs-1.9.8-linux-x86_64/examples/version.js
phantomjs-1.9.8-linux-x86_64/examples/movies.js
phantomjs-1.9.8-linux-x86_64/examples/child_process-examples.js
phantomjs-1.9.8-linux-x86_64/examples/loadurlwithoutcss.coffee
phantomjs-1.9.8-linux-x86_64/examples/version.coffee
phantomjs-1.9.8-linux-x86_64/examples/seasonfood.js
phantomjs-1.9.8-linux-x86_64/examples/server.js
phantomjs-1.9.8-linux-x86_64/examples/countdown.js
phantomjs-1.9.8-linux-x86_64/examples/rasterize.js
phantomjs-1.9.8-linux-x86_64/examples/injectme.js
phantomjs-1.9.8-linux-x86_64/examples/run-jasmine.js
phantomjs-1.9.8-linux-x86_64/examples/post.js
phantomjs-1.9.8-linux-x86_64/examples/imagebin.coffee
phantomjs-1.9.8-linux-x86_64/examples/pizza.coffee
phantomjs-1.9.8-linux-x86_64/examples/hello.coffee
phantomjs-1.9.8-linux-x86_64/examples/features.js
phantomjs-1.9.8-linux-x86_64/examples/movies.coffee
phantomjs-1.9.8-linux-x86_64/examples/tweets.coffee
phantomjs-1.9.8-linux-x86_64/examples/injectme.coffee
phantomjs-1.9.8-linux-x86_64/examples/features.coffee
phantomjs-1.9.8-linux-x86_64/examples/colorwheel.coffee
phantomjs-1.9.8-linux-x86_64/examples/walk_through_frames.js
phantomjs-1.9.8-linux-x86_64/examples/printmargins.coffee
phantomjs-1.9.8-linux-x86_64/examples/printmargins.js
phantomjs-1.9.8-linux-x86_64/examples/scandir.coffee
phantomjs-1.9.8-linux-x86_64/examples/loadspeed.coffee
phantomjs-1.9.8-linux-x86_64/examples/printenv.js
phantomjs-1.9.8-linux-x86_64/examples/serverkeepalive.coffee
phantomjs-1.9.8-linux-x86_64/examples/fibo.coffee
phantomjs-1.9.8-linux-x86_64/examples/echoToFile.coffee
phantomjs-1.9.8-linux-x86_64/examples/netlog.js
phantomjs-1.9.8-linux-x86_64/examples/useragent.coffee
phantomjs-1.9.8-linux-x86_64/examples/child_process-examples.coffee
phantomjs-1.9.8-linux-x86_64/examples/weather.coffee
phantomjs-1.9.8-linux-x86_64/examples/direction.coffee
phantomjs-1.9.8-linux-x86_64/examples/module.coffee
phantomjs-1.9.8-linux-x86_64/examples/printenv.coffee
phantomjs-1.9.8-linux-x86_64/examples/simpleserver.js
phantomjs-1.9.8-linux-x86_64/examples/fibo.js
phantomjs-1.9.8-linux-x86_64/examples/imagebin.js
phantomjs-1.9.8-linux-x86_64/examples/colorwheel.js
phantomjs-1.9.8-linux-x86_64/examples/technews.js
phantomjs-1.9.8-linux-x86_64/examples/hello.js
phantomjs-1.9.8-linux-x86_64/examples/echoToFile.js
phantomjs-1.9.8-linux-x86_64/examples/postserver.coffee
phantomjs-1.9.8-linux-x86_64/examples/page_events.coffee
phantomjs-1.9.8-linux-x86_64/examples/postserver.js
phantomjs-1.9.8-linux-x86_64/examples/weather.js
phantomjs-1.9.8-linux-x86_64/examples/countdown.coffee
phantomjs-1.9.8-linux-x86_64/examples/netsniff.coffee
phantomjs-1.9.8-linux-x86_64/examples/detectsniff.js
phantomjs-1.9.8-linux-x86_64/examples/render_multi_url.coffee
phantomjs-1.9.8-linux-x86_64/examples/useragent.js
phantomjs-1.9.8-linux-x86_64/examples/walk_through_frames.coffee
phantomjs-1.9.8-linux-x86_64/examples/post.coffee
phantomjs-1.9.8-linux-x86_64/examples/arguments.js
phantomjs-1.9.8-linux-x86_64/examples/simpleserver.coffee
phantomjs-1.9.8-linux-x86_64/examples/run-qunit.coffee
phantomjs-1.9.8-linux-x86_64/examples/outputEncoding.coffee
phantomjs-1.9.8-linux-x86_64/examples/phantomwebintro.js
phantomjs-1.9.8-linux-x86_64/examples/follow.coffee
phantomjs-1.9.8-linux-x86_64/examples/loadspeed.js
phantomjs-1.9.8-linux-x86_64/examples/page_events.js
phantomjs-1.9.8-linux-x86_64/examples/loadurlwithoutcss.js
phantomjs-1.9.8-linux-x86_64/examples/sleepsort.js
phantomjs-1.9.8-linux-x86_64/examples/sleepsort.coffee
phantomjs-1.9.8-linux-x86_64/examples/netlog.coffee
phantomjs-1.9.8-linux-x86_64/examples/outputEncoding.js
phantomjs-1.9.8-linux-x86_64/examples/serverkeepalive.js
phantomjs-1.9.8-linux-x86_64/examples/phantomwebintro.coffee
phantomjs-1.9.8-linux-x86_64/examples/server.coffee
phantomjs-1.9.8-linux-x86_64/examples/universe.js
phantomjs-1.9.8-linux-x86_64/examples/pagecallback.coffee
phantomjs-1.9.8-linux-x86_64/examples/stdin-stdout-stderr.js
phantomjs-1.9.8-linux-x86_64/examples/detectsniff.coffee
phantomjs-1.9.8-linux-x86_64/examples/unrandomize.coffee
phantomjs-1.9.8-linux-x86_64/examples/netsniff.js
phantomjs-1.9.8-linux-x86_64/ChangeLog
phantomjs-1.9.8-linux-x86_64/README.md
phantomjs-1.9.8-linux-x86_64/LICENSE.BSD
phantomjs-1.9.8-linux-x86_64/third-party.txt
root@maxbasecode:~# sudo mv $PHANTOM_JS /usr/local/share
root@maxbasecode:~# sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
root@maxbasecode:~# phantomjs --version
-bash: /usr/local/bin/phantomjs: cannot execute binary file: Exec format error
root@maxbasecode:~#
root@maxbasecode:~# phantomjs --version
-bash: /usr/local/bin/phantomjs: cannot execute binary file: Exec format error
root@maxbasecode:~# phantomjs --version
-bash: /usr/local/bin/phantomjs: cannot execute binary file: Exec format error
root@maxbasecode:~# nano install.sh
root@maxbasecode:~# bash install.sh
install.sh: line 17: aarch64=i686: command not found
Hit:1 http://nginx.org/packages/ubuntu jammy InRelease
Hit:2 https://mirror.hetzner.com/ubuntu/packages jammy InRelease
Hit:3 https://mirror.hetzner.com/ubuntu/packages jammy-updates InRelease
Hit:4 https://mirror.hetzner.com/ubuntu/packages jammy-backports InRelease
Hit:5 https://mirror.hetzner.com/ubuntu/security jammy-security InRelease
Hit:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
Get:7 https://packages.microsoft.com/repos/microsoft-ubuntu-jammy-prod jammy InRelease [3,632 B]
Get:8 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease [3,632 B]
Fetched 7,264 B in 1s (8,467 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
libxft-dev is already the newest version (2.3.4-1).
chrpath is already the newest version (0.16-2).
libssl-dev is already the newest version (3.0.2-0ubuntu1.15).
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libfreetype6 is already the newest version (2.11.1+dfsg-1ubuntu0.2).
libfreetype6-dev is already the newest version (2.11.1+dfsg-1ubuntu0.2).
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libfontconfig1 is already the newest version (2.13.1-4.2ubuntu5).
libfontconfig1-dev is already the newest version (2.13.1-4.2ubuntu5).
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
--2024-05-30 16:07:38--  https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-aarch64.tar.bz2
Resolving bitbucket.org (bitbucket.org)... 2406:da00:ff00::22cd:e0db, 2406:da00:ff00::22c0:3470, 2406:da00:ff00::22c5:2ef4, ...
Connecting to bitbucket.org (bitbucket.org)|2406:da00:ff00::22cd:e0db|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-05-30 16:07:39 ERROR 404: Not Found.

tar (child): phantomjs-1.9.8-linux-aarch64.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
mv: cannot stat 'phantomjs-1.9.8-linux-aarch64': No such file or directory

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