问题
so I'm trying to run chromedriver 2.20 downloaded from
wget http://chromedriver.storage.googleapis.com/2.20/chromedriver_linux64.zip
and on my ubuntu 14.04
x86_64 x86_64 x86_64 GNU/Linux
I get the following message
./chromedriver: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
digging in further I see that it's missing a whole bunch.
me@me:/var/chrome# ldd ./chromedriver
linux-vdso.so.1 => (0x00007ffc0e5aa000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f472eb63000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f472e95f000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f472e70e000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f472e406000)
libnss3.so => not found
libnssutil3.so => not found
libsmime3.so => not found
libnspr4.so => not found
libgconf-2.so.4 => not found
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f472e0d1000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007f472ddcd000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f472dac7000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f472d8b1000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f472d693000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f472d2ce000)
/lib64/ld-linux-x86-64.so.2 (0x00007f472ed6b000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f472d0c6000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f472ce88000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f472cc69000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f472ca65000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f472c85f000)
So where can I Get the missing files?
回答1:
I needed the following packages installed with apt/apt-get:
- libglib2.0-0
- libnss3
- libx11-6
I've been working on Ubuntu 16.04, so this might need slight adjustment for 14.04. Depending on how stripped down your installation is, you might also need libpcre or libstdc++, but they have probably already come with other packages.
You will probably also need to install chrome, which should bring those packages in anyway.
来源:https://stackoverflow.com/questions/33382998/chromedriver-various-lib-dependencies-are-missing-on-ubuntu-14-04-64-bit