chromedriver:ubuntu 14.04 64位上缺少各种lib依赖项

时间:2015-10-28 04:37:27

标签: ubuntu selenium-chromedriver

所以我试图运行从

下载的chromedriver 2.20
 wget http://chromedriver.storage.googleapis.com/2.20/chromedriver_linux64.zip

和我的ubuntu 14.04

 x86_64 x86_64 x86_64 GNU/Linux

我收到以下消息

./chromedriver: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

进一步挖掘我发现它缺少了一大堆。

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)

那么我在哪里可以获取丢失的文件?

1 个答案:

答案 0 :(得分:4)

我需要使用apt / apt-get安装以下软件包:

  • libglib2.0-0
  • libnss3
  • libx11-6

我一直在研究Ubuntu 16.04,所以这可能需要稍微调整一下14.04。根据安装的精简程度,您可能还需要libpcre或libstdc ++,但它们可能已经附带其他软件包。

您可能还需要安装chrome,无论如何都应该使用这些包。