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

Amazon web services 在ec2 ubuntu服务器上运行google chrome headless,amazon-web-services,google-chrome,amazon-ec2,Amazon Web Services,Google Chrome,Amazon Ec2,您好,我有一台ec2服务器,以下是配置: DNS公共(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以无头使用它时,我遇到了以下问题: cat: relocation error: /opt/google/

您好,我有一台ec2服务器,以下是配置:

DNS公共(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以无头使用它时,我遇到了以下问题:

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:

我试图复制,但遇到了与您相同的问题。但另一种方法对我有效。你可以试试,最好是在新的ubuntu实例上

安装预请求

sudo apt update
sudo apt install unzip libnss3 python3-pip
安装

安装google chrome稳定当前版本(83)

检查安装情况

google-chrome-stable --version
安装selenium

pip3 install selenium --user

在我的测试中,安装是成功的,但我还没有验证
selenium
是否按预期工作。我只关注了
chrome
selenium
是否安装。

我尝试了你的方法,不幸的是,它对我没有任何改变,我也有同样的方法error@ahmedaao你在一个新的ubuntu实例上试过吗?以前,直到我启动clean实例,它才起作用。
google-chrome-stable --version
pip3 install selenium --user