linuxamazon-web-servicesgoogle-chromeselenium-chromedriver

Install Chrome/Cromium on Amazon Linux v2 (ARM64/aarch64/Gravitone)


Does anyone know a working solution to install Google Chrome(Chromium) on Amazon Linux 2 with ARM64 architecture (Gravitone c6g.xlarge instance)? I need to run it in headless mode. At the moment I can't find any packages in yum:

No package chromium available.

When I try to install it using the RPM package I get the error:

Error: Package: chromium-87.0.4280.141-1.el8.aarch64 (/chromium-87.0.4280.141-1.el8.aarch64) Requires: libm.so.6(GLIBC_2.27)(64bit)

Error: Package: chromium-87.0.4280.141-1.el8.aarch64 (/chromium-87.0.4280.141-1.el8.aarch64) Requires: libz.so.1(ZLIB_1.2.9)(64bit)

Error: Package: chromium-87.0.4280.141-1.el8.aarch64 (/chromium-87.0.4280.141-1.el8.aarch64) Requires: chromium-common(aarch-64) = 87.0.4280.141-1.el8

Error: Package: chromium-87.0.4280.141-1.el8.aarch64 (/chromium-87.0.4280.141-1.el8.aarch64) Requires: libc.so.6(GLIBC_2.28)(64bit)

When I try to run sudo yum install glibc I get:

glibc-2.26-39.amzn2.aarch64

Looks like Amazon Linux has installed own older version of glibc. Same situation with zlib package, available older version:

zlib-1.2.7-18.amzn2.aarch64


Solution

  • To really solve the problem if you are using EC2 instance or any other server where you are running Amazon linux, you should follow the below steps .

    Enable and install Extra Packages for Enterprise Linux by running the command

    sudo amazon-linux-extras install epel -y
    

    Post installing all the extra packages successfully, Install chromimum as usual

    sudo yum install -y chromium
    

    Once you do that Chromium will have all required such as libatk* libgdk* etc ...

    You should be able to easily launch Chromium

    The missed out packages that you are looking here, are actually not missedout they are kind of default you just have to enable them , this is well documented in AWS documentation .

    https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/