我一直试图让我的 Selenium 脚本在运行 raspbian 的树莓派 4 上运行。该脚本在我的 Mac 上运行良好。
问题在于设置网络驱动程序。我尝试安装了几个 webdrivers,包括 chromedriver、geckodriver、operadriver 和 phantomjsdriver。
每当我尝试运行脚本(我当然将其更改为相应的驱动程序)时,都会遇到以下错误:
OSError: [Errno 8] Exec format error: 'operadriver'
同样尝试直接从外壳打开驱动程序会导致错误:
pi@raspberrypi:/home/shares/users $ chromedriver
bash: /usr/local/bin/chromedriver: cannot execute binary file: Exec format error
我的研究发现有些人让它工作,但所有的帖子似乎都很旧。一些暗示错误的地方是指向 cpu 架构,在我的例子中是 armv7l/armhf。
那么这些天是否有可能让 Selenium 在 pi 上运行?有没有人让这个工作?