Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer
    
The PhantomJS artifact needs to be the same across all systems (dev and build). I tried building PhantomJS on CentOS and it built fine and it even seems to run fine. However, when I copy the binaries and libs over to my box and run that build of PhantomJS, I get ./phantomjs: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory which makes no sense to me because those libraries are there in the lib sub directory. They just need to be placed relative to the binary in bin. –  vivin Aug 23 '12 at 23:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.