phantomjs dependency not found on Ubuntu

Created on 28 Jul 2016  路  9Comments  路  Source: ariya/phantomjs

  1. Which version of PhantomJS are you using? Tip: run phantomjs --version.
    phantomjs-2.1.1-linux-i686
  2. What steps will reproduce the problem?

https://gist.github.com/julionc/7476620

  1. Which operating system are you using?
    Ubuntu 16.04 LTS
  2. Did you use binary PhantomJS or did you compile it from source?
    Binary
  3. Please provide any additional information below.
    _phantomjs: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory_

Most helpful comment

solved by

apt-get install libfontconfig

All 9 comments

gist is missing.

Could you also post the output of ldd phantomjs ?

Thanks gist url updated.

$ ldd phantomjs
ldd: ./phantomjs: No such file or directory

Thanks.

You must execute ldd on the executable from the archive.

Sorry,

$ ldd phantomjs
linux-gate.so.1 => (0xf77d9000)
libz.so.1 => not found
libfontconfig.so.1 => not found
libfreetype.so.6 => not found
libdl.so.2 => /lib32/libdl.so.2 (0xf77b2000)
librt.so.1 => /lib32/librt.so.1 (0xf77a9000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf778b000)
libstdc++.so.6 => not found
libm.so.6 => /lib32/libm.so.6 (0xf7736000)
libgcc_s.so.1 => not found
libc.so.6 => /lib32/libc.so.6 (0xf7583000)
/lib/ld-linux.so.2 (0x565f8000)

I think you're trying to run x86 ELF binary on x64 system. I suggest you to try phantomjs-2.1.1-linux-x86_64.tar.bz2

thank you for pointing out.

In ubuntu 14.04 x64 docker get this error too.

root@f57e4f37f0aa:/data/phantomjs-2.1.1-linux-x86_64/bin# ls
phantomjs

root@f57e4f37f0aa:/data/phantomjs-2.1.1-linux-x86_64/bin# phantomjs
phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

root@f57e4f37f0aa:/data/phantomjs-2.1.1-linux-x86_64/bin# uname -a
Linux f57e4f37f0aa 3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

solved by

apt-get install libfontconfig

Thanks @eromoe - fixed the same problem with MS Windows 10 (WSL) running Ubuntu 16.04

Was this page helpful?
0 / 5 - 0 ratings

Related issues

naitsirch picture naitsirch  路  3Comments

h4wlt picture h4wlt  路  5Comments

gustavohenke picture gustavohenke  路  4Comments

dhilipsiva picture dhilipsiva  路  4Comments

mz3 picture mz3  路  5Comments