Andrew Roy

Registered
Jul 9, 2015
1
0
1
Altrincham
cPanel Access Level
Website Owner
I installed "phantomjs" from "phantomjs.org/build.html" (You can see instruction for installation).



but when I am running some commands related to phantomjs as shown in "phantomjs.org/screen-capture.html", then its showing some error "phantomjs: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory".



I want to use phantomjs for image capture and I did this for windows based ssystem but unable to configure it on centOS.



Can you please help me out with this issue.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello :)

Have you verified the "freetype" package is installed on your system? Also, is this application expecting it at a certain location?

Thank you.
 

Pascu

Registered
Jul 21, 2015
2
0
1
España, Alicante
cPanel Access Level
Root Administrator
Hi

I recently installed WHM on CentOS 7 and I am trying to install Phantomjs 2.0.0
I have all the dependencies installed I have even disabled the firewall ... no way to compile this ... somebody could tell me where I could come this error?

Bests Regards
Code:
#######Please submit a full bug report,##########
with preprocessed source if appropriate.
See <" target="_blank" class="externalLink ProxyLink" data-proxy-href="http://bugzilla.redhat.com/bugzilla>" rel="nofollow">http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [.obj/qdatetimeparser.o] Error 4
g++: error interno del compilador: Violación de segmento (programa cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <" target="_blank" class="externalLink ProxyLink" data-proxy-href="http://bugzilla.redhat.com/bugzilla>" rel="nofollow">http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [.obj/qdatetime.o] Error 4
make[2]: se sale del directorio `/opt/phantomjs-2.0.0/src/qt/qtbase/src/corelib'
make[1]: *** [sub-corelib-make_first] Error 2
make[1]: se sale del directorio `/opt/phantomjs-2.0.0/src/qt/qtbase/src'
make: *** [sub-src-make_first] Error 2
 
Last edited by a moderator:

Pascu

Registered
Jul 21, 2015
2
0
1
España, Alicante
cPanel Access Level
Root Administrator
Hi
Here I leave information on how to install Phantomjs on CentOS 7
Basically I need to find the installation package compiled whit build packege made, otherwise execute ./build It takes a lot of mime and from there the problems begin

Code:
PHANTOMJS ON CENTOS 7 / WHM / CPANEL
Make sure you have installed the necessary dependencies to compile the script ... typically are this, for more info visit the official website

yum install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6 gcc gcc-c++ make git openssl-devel freetype-devel fontconfig-devel

1. Create a directory for this script, I have created in / opt
mkdir -p /opt/phantomjs

2. Download and unzip
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
tar -xjvf phantomjs-1.9.8-linux-x86_64.tar.bz2

3. Moves the files to where the script will reside
mv phantomjs-1.9.8-linux-x86_64/* /opt/phantomjs

4. create symbolic links
ln -s /opt/phantomjs/bin/phantomjs /usr/bin/phantomjs
ln -s /opt/phantomjs/bin/phantomjs /usr/local/bin/phantomjs

5.test phantomjs

phantomjs /opt/phantomjs/examples/hello.js
phantomjs -v

6. Be a clean guy and delete files you no longer need

run rm -rf  for phantomjs-1.9.8-linux-x86_64.tar.bz2 and phantomjs-1.9.8-linux-x86_64
Bests regards !!! and if you want to see phantomjs working in a real site visit my website - Removed - and index your WebSite
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
I am happy to see you were able to complete the installation. Thank you for updating us with the method you used.