【问题标题】:Can't use chromedriver with Selenium after Ubuntu upgradeUbuntu 升级后无法将 chromedriver 与 Selenium 一起使用
【发布时间】:2016-05-01 11:45:36
【问题描述】:

我的Ubuntu 操作系统从 12 升级到 14.04 版本。代码

from selenium import webdriver
driver = webdriver.Chrome()

升级前完美运行,但现在弹出以下错误:

这台计算机无法再运行 Google Chrome,因为它的硬件不再受支持

尝试安装稳定版Chrome,但是没有用... 我仍然可以打开Chrome 浏览器并从shell 运行chromedriver 服务器,但我需要使用selenium 启动chromediver

【问题讨论】:

标签: python linux google-chrome selenium


【解决方案1】:

通过将/bin 文件夹添加到PATH 解决:

export PATH=$PATH:/bin

根据需要使用grepreadlink

user@LinuxServer:~/Desktop$ google-chrome -v

/usr/bin/google-chrome: line 8: readlink: command not found

/usr/bin/google-chrome:第 15 行:grep:找不到命令

【讨论】:

    猜你喜欢
    • 2014-04-23
    • 1970-01-01
    • 2012-03-21
    • 1970-01-01
    • 2019-05-27
    • 1970-01-01
    • 2015-08-17
    • 2020-10-22
    • 2020-02-20
    相关资源
    最近更新 更多