如何将Chrome浏览器安装到CPANEL Linux托管中

发布于 2025-02-13 19:24:03 字数 555 浏览 0 评论 0原文

[我将项目部署到使用Linux OS的CPANEL托管。我还在网站上下载了Chromedrive for Linux:[https://chromedriver.storage.storage.googleapis.com/index.html?path=103.0.5060.53/] [1],

绝对路径如下,

driver = webdriver.Chrome(executable_path=r'/home/gettaing/seleniumtest/chromedriver',options=chrome_options)

我也尝试了Windows的Chromedrive,我也尝试了Chromedrive但是有同样的错误。

webdriverexception在 /消息:未知错误:找不到chrome二进制< / p>

chrome

pip install pybrowsers
print(browsers.get("chrome"))

二进制

[I deploy the project to Cpanel hosting using Linux os. And I also downloaded ChromeDrive for Linux at the site: [https://chromedriver.storage.googleapis.com/index.html?path=103.0.5060.53/][1]

With absolute path as follows

driver = webdriver.Chrome(executable_path=r'/home/gettaing/seleniumtest/chromedriver',options=chrome_options)

And I also tried ChromeDrive for Windows but got the same error.

WebDriverException at / Message: unknown error: cannot find Chrome binary

Then I try to install pybrowsers to check if the web browser is installed or not

pip install pybrowsers
print(browsers.get("chrome"))

And the result is None

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文