【问题标题】:Steps to Install and run headless chrome browser on centos 6.5 using chrome driver使用 chrome 驱动在 centos 6.5 上安装和运行 headless chrome 浏览器的步骤
【发布时间】:2018-02-16 23:40:49
【问题描述】:

我需要在centos 6.5 上安装chrome 浏览器,这里我需要自动化一些web gui。我已经安装了 chrome 驱动程序。谁能提供chrome-61的步骤和下载链接以及如何安装它。我的操作系统没有任何 Gui。请提供命令。

我正在使用 java selenium。

提前致谢

【问题讨论】:

标签: linux automation selenium-chromedriver centos7


【解决方案1】:

实际上,有一种方法可以在 amazon linux、centos 6.x 和 rhel 上同时运行 chrome 和 chromedriver。使用较新操作系统的库的基本思想。

在此处查看全自动脚本 https://github.com/staier/chromedriver-centos6-installation

这个添加了chromedriver安装到 文中脚本:https://intoli.com/blog/installing-google-chrome-on-centos/

【讨论】:

    【解决方案2】:

    这是在 CentOS 6 上安装 Google Chrome 的指南。非常感谢 Intoli.com 的人!

    它也适用于 Amazon Linux 和 Red Hat Enterprise Linux。

    https://intoli.com/blog/installing-google-chrome-on-centos/

    【讨论】:

    • 你是真正的MVP
    • 两年过去了,我不确定这是否有效。 Chrome 使用 ``` google-chrome --headless --disable-gpu google.com [0105/235507.059608:ERROR:sandbox_linux.cc(378)] InitializeSandbox() 在进程 gpu-process 中使用多个线程调用。 ``` 或 ``` google-chrome-stable --headless --disable-gpu --disable-software-rasterizer google.com [0105/235527.967960:ERROR:gpu_init.cc(457)] 不支持直通,GL已禁用,角度为 ```
    【解决方案3】:

    遗憾的是,Google Chrome 不再支持 6.x。你需要 CentOS 7.x。

    我使用了 Cent-OS 7.4.*,它运行良好。

    这些是要遵循的步骤:

    • 下载chromedriver:登录Linux机器并执行以下命令:

      $ wget https://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip
      $ unzip chromedriver_linux64.zip
      $ chromedriver --version
      ChromeDriver 2.40.565383
      

    确保您始终安装最新版本!

    • 下载 Chrome 浏览器

      $ wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
      $ sudo yum install google-chrome-stable_current_x86_64.rpm
      
      $ google-chrome --version
      Google Chrome 67.0.3396.87
      
      $ yum install Xvfb
      
      $ ps -ef | grep Xvfb
      username 12988     1  0 Oct05 ?        00:00:02 Xvfb :99 -screen 0 1152x900x8
      
      $ yum install maven
      $ mvn -version
      Apache Maven 3.0.5 (Red Hat 3.0.5-17)
      

    【讨论】:

    • 为什么选择 Xvfb?无头 Chrome 不应该使用某种内部帧缓冲区而不是依赖 X11 吗?
    • 你不需要 Centos 7 -- 请参阅下面的答案 -- Chrome 在 Centos 6 上运行良好。
    • 1. 它给出了错误command chromedriver not found。 2. 如何设置 Xvfb 屏幕?当我执行此命令时,它没有显示屏幕大小,而是像这样 19882 19405 0 16:26 pts/3 00:00:00 grep --color=auto Xvfb
    • 我在 centos7 上有这个错误:包:google-chrome-stable-70.0.3538.110-1.x86_64 (/google-chrome-stable_current_x86_64) 要求:liberation-fonts
    • 查看此链接dist.control.lth.se/public/CentOS-7/x86_64/google.x86_64 了解 google-chrome 的特定版本
    猜你喜欢
    • 1970-01-01
    • 2018-06-08
    • 1970-01-01
    • 2021-07-27
    • 1970-01-01
    • 2014-05-27
    • 2014-01-26
    • 2019-02-02
    • 1970-01-01
    相关资源
    最近更新 更多