0

I am trying to install google-chrome on Amazon server

NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"

by following https://access.redhat.com/discussions/917293

but it gives me dependency errors as below and does not install

--> Processing Dependency: libgtk-3.so.0()(64bit) for package: google-chrome-stable-71.0.3578.98-1.x86_64
--> Finished Dependency Resolution
Error: Package: google-chrome-stable-71.0.3578.98-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libappindicator3.so.1()(64bit)
Error: Package: google-chrome-stable-71.0.3578.98-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libatspi.so.0()(64bit)
Error: Package: google-chrome-stable-71.0.3578.98-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: xdg-utils
Error: Package: google-chrome-stable-71.0.3578.98-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libatk-bridge-2.0.so.0()(64bit)
Error: Package: google-chrome-stable-71.0.3578.98-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libatk-1.0.so.0()(64bit)
Error: Package: google-chrome-stable-71.0.3578.98-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: liberation-fonts
Error: Package: google-chrome-stable-71.0.3578.98-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libgdk-3.so.0()(64bit)
Error: Package: google-chrome-stable-71.0.3578.98-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libgdk_pixbuf-2.0.so.0()(64bit)
Error: Package: google-chrome-stable-71.0.3578.98-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libXss.so.1()(64bit)
Error: Package: google-chrome-stable-71.0.3578.98-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libgtk-3.so.0()(64bit)
 You could try using --skip-broken to work around the problem

Even tried doing the work around as mentioned with --skip-broken , yet it did not get installed ,

yum list installed google-chrome
Loaded plugins: fastestmirror, priorities, update-motd, upgrade-helper
Loading mirror speeds from cached hostfile
 * amzn-main: packages.us-east-1.amazonaws.com
 * amzn-updates: packages.us-east-1.amazonaws.com
Error: No matching Packages to list

tried resolving the dependencies but strangely the packages are not there on the amazon yum repos

 yum search libappindicator3
Loaded plugins: fastestmirror, priorities, update-motd, upgrade-helper
Loading mirror speeds from cached hostfile
 * amzn-main: packages.us-east-1.amazonaws.com
 * amzn-updates: packages.us-east-1.amazonaws.com
Warning: No matches found for: libappindicator3
No matches found

then followed this https://stackoverflow.com/questions/22836219/centos-6-5-howto-install-gtk-version-2-8-0

yum install gtk+-devel gtk2-devel
Loaded plugins: fastestmirror, priorities, update-motd, upgrade-helper
Loading mirror speeds from cached hostfile
 * amzn-main: packages.us-east-1.amazonaws.com
 * amzn-updates: packages.us-east-1.amazonaws.com
amzn-main                                                                                                                                                                                                              | 2.1 kB  00:00:00     
amzn-updates                                                                                                                                                                                                           | 2.5 kB  00:00:00     
No package gtk+-devel available.
No package gtk2-devel available.
Error: Nothing to do

then i found out the rpm repo and tried to install directly from that with again recursive dependencies

https://centos.pkgs.org/7/centos-x86_64/gtk2-devel-2.24.31-1.el7.x86_64.rpm.html

rpm -ivh http://mirror.centos.org/centos/7/os/x86_64/Packages/gtk2-devel-2.24.31-1.el7.x86_64.rpm
Retrieving http://mirror.centos.org/centos/7/os/x86_64/Packages/gtk2-devel-2.24.31-1.el7.x86_64.rpm
warning: /var/tmp/rpm-tmp.qvgrSF: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
    atk-devel >= 1.29.4-2 is needed by gtk2-devel-2.24.31-1.el7.x86_64
    cairo-devel >= 1.6.0-1 is needed by gtk2-devel-2.24.31-1.el7.x86_64
    gdk-pixbuf2-devel is needed by gtk2-devel-2.24.31-1.el7.x86_64
    glib2-devel >= 2.28.0-1 is needed by gtk2-devel-2.24.31-1.el7.x86_64
    gtk2 = 2.24.31-1.el7 is needed by gtk2-devel-2.24.31-1.el7.x86_64
    libXcomposite-devel is needed by gtk2-devel-2.24.31-1.el7.x86_64
    libXcursor-devel is needed by gtk2-devel-2.24.31-1.el7.x86_64
    libatk-1.0.so.0()(64bit) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    libgailutil.so.18()(64bit) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    libgdk-x11-2.0.so.0()(64bit) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    libgdk_pixbuf-2.0.so.0()(64bit) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    libgtk-x11-2.0.so.0()(64bit) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    pango-devel >= 1.20.0-1 is needed by gtk2-devel-2.24.31-1.el7.x86_64
    pkgconfig(atk) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    pkgconfig(cairo) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    pkgconfig(gdk-pixbuf-2.0) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    pkgconfig(gio-2.0) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    pkgconfig(pango) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    pkgconfig(pangocairo) is needed by gtk2-devel-2.24.31-1.el7.x86_64
    pkgconfig(pangoft2) is needed by gtk2-devel-2.24.31-1.el7.x86_64

i literally tried resolving all the missing packages but they are not there and i cant get chrome to install . .

0

Simple answer is that the first linked tutorial (access.redhat.com/...) is NOT for a AMI.

Amazon AMI has the ability and appears to have taken such ability to limit the repos and availability of packages in it's AMI might consider working with the following AMI:

https://aws.amazon.com/marketplace/pp/B00KWBZVK6/ref=ptnr_catgtm_centos

This one allows for upstream repo updates and additions unlike the one you mentioned using.

0

I solved it , got it to install the latest chrome version and got it to work in headless mode ,

used a very effective script on https://intoli.com/blog/installing-google-chrome-on-centos/

quickest way is to run command : curl https://intoli.com/install-google-chrome.sh | bash .

which installed all the dependencies and installed the app .latest stable version 71.

The final goal was to be able to run it with selenium , with some minor tweaks to allow it to run on headless mode , got it working with selenium .

chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
browser = webdriver.Chrome('/path_to_chrome_driver',chrome_options=chrome_options)

works smoothly.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.