This post will be a long history of what I am going through (will include steps with failures…)
1. I downloaded phantomjs-1.7.0-linux-x86_64.tar.bz2 binary file from this page.
2. When I executed it, I got this error:
phantomjs: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory
3. So I installed libfreetype.so.6:
sudo yum install libfreetype.so.6
4. I still get the same phantomjs error, which says libfreetype.so.6 is not found.
5. Looks like the libfreetype.so.6 was installed on /usr/lib, which is for 32 bit software and phantomjs needs one for 64 bit system.
6. So I created symlinks and placed them in /usr/lib64/
7. I get different error message (progress made!):
phantomjs: error while loading shared libraries: libfreetype.so.6: wrong ELF class: ELFCLASS32
8. It turned out that I just needed to install freetype:
yum install freetype
9. Now another dependency issue:
libfontconfig.so.1: cannot open shared object file: No such file or directory
10. “yum install fontconfig”. that installed correct lib files.
11. Got it installed. 🙂
[xxxxx@localhost ~]$ phantomjs –version
UPDATE Dec 6, 2012
Found this blog post for Phantomjs and qunit.
Another very resourceful answers at stackoverflow regarding phantomjs, ant, and jenkins.