PhantomJS on CentOS 5.5 (glibc and libstdc++ versions)

vivin asked:

I’m trying to run PhantomJS on CentOS, but I get the following:

./phantomjs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./phantomjs)
./phantomjs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./phantomjs)
./phantomjs: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by ./phantomjs)
./phantomjs: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by /home/bamboo/bamboo-data/xml-data/build-dir/PHANTOMJS-ARTIFACT-JOB1/target/checkout/dists/linux_x64/bin/../lib/libQtGui.so.4)
./phantomjs: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by /home/bamboo/bamboo-data/xml-data/build-dir/PHANTOMJS-ARTIFACT-JOB1/target/checkout/dists/linux_x64/bin/../lib/libQtGui.so.4)
./phantomjs: /lib64/libc.so.6: version `GLIBC_2.9' not found (required by /home/bamboo/bamboo-data/xml-data/build-dir/PHANTOMJS-ARTIFACT-JOB1/target/checkout/dists/linux_x64/bin/../lib/libQtGui.so.4)
./phantomjs: /lib64/libc.so.6: version `GLIBC_2.10' not found (required by /home/bamboo/bamboo-data/xml-data/build-dir/PHANTOMJS-ARTIFACT-JOB1/target/checkout/dists/linux_x64/bin/../lib/libQtNetwork.so.4)
./phantomjs: /lib64/libc.so.6: version `GLIBC_2.9' not found (required by /home/bamboo/bamboo-data/xml-data/build-dir/PHANTOMJS-ARTIFACT-JOB1/target/checkout/dists/linux_x64/bin/../lib/libQtCore.so.4)

I even built a static build of PhantomJS, but it appears that the libraries bundled with PhantomJS have dependencies on glibc and libstdc++.

Building a specific PhantomJS binary on CentOS is not an option because this machine is our continuous integration box that builds and tests our project. I have PhantomJS packaged as an artifact which is then unpacked during the build process and used (for Javascript Continuous Integration). So this exact artifact needs to be used.

Is there an easy way to upgrade glibc and libstdc++? I tried yum install glibc and yum install libstdc++. I noticed that it did perform an update, but there was no change after I tried to run PhantomJS again.

My answer:


You built PhantomJS on a much newer system than the one you’re trying to deploy it on. Rebuild it on a system matching the deployment system.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.