Installing Chromium on Amazon Linux

Vic Seedoubleyew picture Vic Seedoubleyew · Jan 27, 2018 · Viewed 11.8k times · Source

I am trying to install Chromium (or Chrome, whichever) on an Amazon Linux machine.

I have tried many steps, to no avail. Here is what I have tried:

Simple Yum Install

yum install epel       # worked
yum install chromium

generated error message:

Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6)
           Requires: libgnome-keyring.so.0()(64bit)
Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6)
           Requires: libgtk-x11-2.0.so.0()(64bit)
Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6)
           Requires: libgdk_pixbuf-2.0.so.0()(64bit)
Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6)
           Requires: libXss.so.1()(64bit)
Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6)
           Requires: libgdk-x11-2.0.so.0()(64bit)
Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6)
           Requires: libcanberra-gtk2(x86-64)
Error: Package: chromium-31.0.1650.63-2.el6.x86_64 (chromium-el6)
           Requires: libatk-1.0.so.0()(64bit)

Yum install of specific RPM package

I tried downloading a Chrome RPM, both the latest stable version as well as a specific version, and then running

yum install google-chrome-stable-64.0.3282.119-1.x86_64.rpm

It yielded the same error message

Manual procedure

Downloaded binary from https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/532015/

Running it generated the error message

error while loading shared libraries: libXcursor.so.1: cannot open shared object file: No such file or directory

I ran

yum install libXcursor
yum install libXfixes     # because chrome was then complaining about that library
yum install libXdamage    # and subsequently that one

which all worked.

However, then Chrome started complaining about a libcups library :

error while loading shared libraries: libcups.so.2: cannot open shared object file: No such file or directory

libcups wasn't found by yum, and it seems that this is because it is a 32 bit library. Some page recommended to install ia32-libs as a solution, but running yum install ia32-libs showed that it was already installed.

I couldn't get past that point.

Other

  • I also tried steps mentioned here, but that didn't work
  • some pages point to using dpkg, but that command doesn't exist on Amazon Linux apparently
  • apt neither

Answer

Aravind.HU picture Aravind.HU · Jan 22, 2021

None of these answers , work, and none of them actually solves problem for amazon linux,

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 .

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

    sudo amazon-linux-extras install epel -y
    
  2. 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/