gpt4 book ai didi

amazon-web-services - 在 ec2 ubuntu 服务器上运行 google chrome headless

转载 作者:行者123 更新时间:2023-12-04 02:33:42 24 4
gpt4 key购买 nike

您好,我有一个 ec2 服务器,这是配置:
DNS 公共(public) (IPv4):ec2-18-191-6-130.us-east-2.compute.amazonaws.com
ID d'AMI:ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20200611 (ami-0a63f96e85105c6d3)
当我尝试安装 google chrome 以 headless 使用它时,我遇到了这个问题:

cat: relocation error: /opt/google/chrome/lib/libc.so.6: symbol _dl_starting_up version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference
我表示我按照这个简单的教程在我的 ec2 服务器上安装 chrome:
https://understandingdata.com/install-google-chrome-selenium-ec2-aws/

最佳答案

我试图复制并遇到与您相同的问题。但是另一种方法对我有用。你可以试试,最好是在新的 ubuntu 实例上。
安装先决条件

sudo apt update
sudo apt install unzip libnss3 python3-pip
安装driver for chrome 83
cd /tmp/
sudo wget https://chromedriver.storage.googleapis.com/83.0.4103.39/chromedriver_linux64.zip
sudo unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/bin/chromedriver
chromedriver --version
安装 google-chrome-stable 当前版本 (83)
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
检查安装
google-chrome-stable --version
安装 Selenium
pip3 install selenium --user
在我的测试中安装成功,但我没有验证 selenium按预期工作。我只关注是否 chromeselenium安装。

关于amazon-web-services - 在 ec2 ubuntu 服务器上运行 google chrome headless,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62848916/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com