Unable to get Headless Chrome to work on AWS Linux 2

0

I fired up a brand new instance of Amazon's Linux 2 AMI (HVM) (Kernel 5.10) and installed with the standard intoli script:

curl -k https://intoli.com/install-google-chrome.sh | bash

Here is the failure:

[root@tst05 chrome]# google-chrome-stable --headless --no-sandbox https://google.com [0204/195107.973900:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable. [0204/195108.002857:WARNING:sandbox_linux.cc(385)] InitializeSandbox() called with multiple threads in process gpu-process. [0204/195110.137419:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [0204/195110.137474:WARNING:property.cc(144)] DaemonVersion: GetAndBlock: failed. [0204/195110.137667:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [0204/195110.137862:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files

I've also tried running yum install google-chrome-stable and the same result.

Do you have any suggestions?

질문됨 일 년 전881회 조회
2개 답변
0

An alternative to installing via this script, is to use the Extra Packages for Enterprise Linux repo and install Chromium from there. On Amazon Linux 2 the following commands will install Chromium.

# Enable Extra Packages for Enterprise Linux 
sudo amazon-linux-extras install epel -y

sudo yum install -y chromium

Running Chromium should work, as chromium-browser --headless --disable-gpu --remote-debugging-port=9222 https://www.chromestatus.com

AWS
Steve
답변함 일 년 전
0

Thanks, but we need to use Chrome because of the interfaces we are using with Selenium in our app.

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠