2017-07-17 4 views
2

Ich versuche PhantomJS in Centos zu installieren. Dies sind die Schritte, denen ich gefolgt bin.Installieren von PhantomJS in CentOS

yum install freetype fontconfig 
cd ~ 
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2 
bunzip2 phantomjs*.tar.bz2 
tar xvf phantomjs*.tar 
cp phantomjs*/bin/phantomjs /usr/bin/phantomjs 

Ich bekomme dies unter Fehler.

phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory 

Kann jemand etwas Licht werfen. Ich habe fontconfig installiert.

Antwort

0

Wow, diese Version ist alt, brauchen Sie es aus einem bestimmten Grund?

Wie auch immer, a basic Google search Ihre Fehler suggests installing ein Zusatzpaket:

libfontconfig 
+0

Ich folgte Schritte aus einigen Blogs. Haben Sie die Schritte, um die neueste Version zu installieren? Vielen Dank ! –

+0

Versuchen Sie https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-i686.tar.bz2 – Vaviloff

+1

Kein Paket libfontconfig für Centos verfügbar –

0

Kein Paket libfontconfig für CentOS verfügbar. Sie könnten versuchen, es manuell zu installieren:

wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.0.tar.gz 
tar -zxvf fontconfig-2.11.0.tar.gz 
cd fontconfig-2.11.0 
./configure -prefix=/usr 
make 
# move the file into /usr/lib manually (don't trust 'make install' on a production box) 
sudo mv ./src/.libs/libfontconfig.so.1.2.0 /usr/lib/ 
# and setup the libfontconfig.so.1 symlink 
cd /usr/lib 
sudo ln -s libfontconfig.so.1.2.0 libfontconfig.so.1