简体   繁体   English

ChromeDriver硒Java Raspberry Pi

[英]ChromeDriver selenium java Raspberry pi

I'm creating a crawler that needs to open a browser to connect a website. 我正在创建一个需要打开浏览器才能连接网站的爬虫。 I'm windows it is actually working with ChromeDriver but I can't do it work in Raspbian. 我是Windows,它实际上可以与ChromeDriver一起使用,但是不能在Raspbian中使用。

First I installed the ChromeDirver from here: 首先,我从这里安装了ChromeDirver:

https://packages.ubuntu.com/search?suite=trusty&arch=armhf&mode=exactfilename&searchon=contents&keywords=chromedriver https://packages.ubuntu.com/search?suite=trusty&arch=armhf&mode=exactfilename&searchon=contents&keywords=chromedriver

using the armhf package and It installed correctly, but when I try to open my program, when it starts to load the driver, fails, with the next error: 使用armhf软件包并正确安装,但是当我尝试打开程序时,它开始加载驱动程序时失败,并出现下一个错误:

/usr/lib/chromium-browser/chromedriver: error while loading shared libraries: libbase.so: cannot open shared object file: No such file or directory / usr / lib / chromium-browser / chromedriver:加载共享库时出错:libbase.so:无法打开共享库文件:没有这样的文件或目录

I saw inside Chromium lib directory and there is not this library. 我在Chromium lib目录中看到了,但没有这个库。 I'm using a raspberry pi 3. How to install it? 我正在使用树莓派3.如何安装?

Do the following 请执行下列操作

sudo nano /etc/ld.so.conf.d/chrome_lib.conf

Then paste the following 然后粘贴以下内容

/usr/lib/chromium-browser/libs

then press ctrl+o . 然后按ctrl+o Press Enter . Enter Then press ctrl+x 然后按ctrl+x

Then run $sudo ldconfig 然后运行$sudo ldconfig

Then try again 然后再试一次

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM