Tested on CentOS 5.5 and 5.9:
$ ldd ./phantomjs-2.1.1-linux-x86_64/bin/phantomjs
./phantomjs-2.1.1-linux-x86_64/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.9' not found (required by ./phantomjs-2.1.1-linux-x86_64/bin/phantomjs)
./phantomjs-2.1.1-linux-x86_64/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.10' not found (required by ./phantomjs-2.1.1-linux-x86_64/bin/phantomjs)
./phantomjs-2.1.1-linux-x86_64/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by ./phantomjs-2.1.1-linux-x86_64/bin/phantomjs)
linux-vdso.so.1 => (0x00007fff81deb000)
libz.so.1 => /usr/local/lib/libz.so.1 (0x00002b96941ed000)
libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0x00002b9694405000)
libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x00002b9694645000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b96948cd000)
librt.so.1 => /lib64/librt.so.1 (0x00002b9694ad1000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b9694cdb000)
libstdc++.so.6 => /usr/local/lib64/libstdc++.so.6 (0x00002b9694ef7000)
libm.so.6 => /lib64/libm.so.6 (0x00002b96951fb000)
libgcc_s.so.1 => /usr/local/lib64/libgcc_s.so.1 (0x00002b969547f000)
libc.so.6 => /lib64/libc.so.6 (0x00002b9695694000)
/lib64/ld-linux-x86-64.so.2 (0x00002b9693fcf000)
libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x00002b96959ec000)
I'm almost certain that PhantomJS will not gonna be supported on CentOS 5.x
See also #12773
@iradul, I asked @ariya if this was on purpose and he told me to create a new issue for this. If the plan is not to support CentOS 5 then feel free to close this issue (and maybe this could be added to the release notes or something).
I can reproduce it using CentOS 5.11:
$ cat /etc/redhat-release
CentOS release 5.11 (Final)
$ wget -q https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -o phantomjs-2.1.1-linux-x86_64.tar.bz2
$ tar jxf phantomjs-2.1.1-linux-x86_64.tar.bz2
$ cd phantomjs-2.1.1-linux-x86_64
$ bin/phantomjs -v
bin/phantomjs: /lib64/libz.so.1: no version information available (required by bin/phantomjs)
bin/phantomjs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by bin/phantomjs)
bin/phantomjs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by bin/phantomjs)
bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.9' not found (required by bin/phantomjs)
bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.10' not found (required by bin/phantomjs)
bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by bin/phantomjs)
Seems that the libraries are too old for PhantomJS binary:
$ strings /usr/lib/libstdc++.so.6|grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBC_2.3
GLIBC_2.0
GLIBC_2.3.2
GLIBC_2.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.2
GLIBCXX_FORCE_NEW
$ strings /lib64/libc.so.6|grep GLIBC
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_PRIVATE
There is this discussion "Can RHEL5 use GLIBCXX_3.4.9 or newer?" at https://access.redhat.com/solutions/38031. Unfortunately it is only available to RedHat subscriber.
I have the same issue. Is there any previous version which support CentOS 5?
You can look at old downloads at https://bitbucket.org/ariya/phantomjs/downloads
But all new versions will be compiled with a newer GLIBC version.
It will be unlikely that we offer something that can work with old GLIBC. I'll update the documentation.
I haven't tried it yet but it seems like the Medium folks managed to make it work on CentOS 5 : see phantom-prebuilt npm package or the github repo
@EFF Negative. That text on Medium repo is outdated (from PhantomJS 1.9). Please bug them to update it!
Anyone know if it works on the latest CentOS?
Centos 6+ if I remember right. Got it working on aws lambda which is based
on centos6
On Tue, Feb 2, 2016 at 11:01 PM blingerson [email protected] wrote:
Anyone know if it works on the latest CentOS?
—
Reply to this email directly or view it on GitHub
https://github.com/ariya/phantomjs/issues/13940#issuecomment-178989810.
I'm having the same problem with CentOS 7:
# wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-i686.tar.bz2
# tar -xvf phantomjs-2.1.1-linux-i686.tar.bz2
# mv phantomjs-2.1.1-linux-i686/ phantomjs-2.1.1
# cd phantomjs-2.1.1/bin
# ./phantomjs -v
./phantomjs: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Notes: zlib is installed, so are all font libraries
# hostnamectl
Static hostname: xxxxxx
Icon name: computer-vm
Chassis: vm
Machine ID: xx
Boot ID: xx
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-327.18.2.el7.x86_64
Architecture: x86-64
use 1.9.6 please!
Most helpful comment
I can reproduce it using CentOS 5.11: