Ubuntu 12.04上的Chromedriver - 加载共享库时出错:libXi.so.6

KJW*_*KJW 21 ubuntu selenium-chromedriver

我在我的Ubuntu 12.04机器上下载了32位chromedriver版本.

但是,它不会运行并退出以下消息.我在互联网上搜索过各个地方,但未能找到解决方案.

./chromedriver: error while loading shared libraries: libXi.so.6: cannot open shared object file: No such file or directory
Run Code Online (Sandbox Code Playgroud)

bar*_*rak 70

libXi.so.6由...提供libxi6.然后Chromedriver也会要求libgconf-2-4提供类似的信息.

sudo apt-get install libxi6 libgconf-2-4
Run Code Online (Sandbox Code Playgroud)

每当遇到丢失特定文件的问题时,apt-file都会来救援:

$ apt-file search libXi.so.6
libxi6: /usr/lib/x86_64-linux-gnu/libXi.so.6
libxi6: /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
libxi6-dbg: /usr/lib/debug/usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
Run Code Online (Sandbox Code Playgroud)

这可以通过apt-get安装:

sudo apt-get install apt-file && apt-file update  # install and fill the index
Run Code Online (Sandbox Code Playgroud)