Question:
Hello I have a ec2 server, here is the config :
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)
When I try to install google chrome to use it headless I have this problem :
1 2 |
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 |
I indicate that I follow this simple tuto to install chrome on my ec2 server :
https://understandingdata.com/install-google-chrome-selenium-ec2-aws/
Answer:
I tried to replicate and had same issues as you. But an alternative approach worked for me. You may try that, preferably on fresh ubuntu instance.
install pre-requsits
1 2 3 |
sudo apt update sudo apt install unzip libnss3 python3-pip |
install driver for chrome 83
1 2 3 4 5 6 |
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 |
install google-chrome-stable current version (83)
1 2 3 |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo apt install ./google-chrome-stable_current_amd64.deb |
check installation
1 2 |
google-chrome-stable --version |
install selenium
1 2 |
pip3 install selenium --user |
The installation is successful in my tests, but I haven’t verified if selenium
works as intended. I only focused on whether chrome
and selenium
install.