thanks for the great article! just tried the localinstall
[ec2-user@ip-172-31-6-82 ~]$ cat /etc/system-release Amazon Linux AMI release 2017.03 sudo yum --nogpgcheck localinstall https://intoli.com/blog/installing-google-chrome-on-centos/google-chrome-stable-60.0.3112.113-1.x86_64.rpm
it seems to work for me, but when i try to generate a pdf I'm getting some weird error messages. (the pdf is being generated though)
is this something I could fix?
[ec2-user@ip-172-31-6-82 ~]$ google-chrome-stable --headless --disable-gpu --print-to-pdf https://www.orf.at [1029/160518.999058:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [1029/160518.999195:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [1029/160518.999331:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [1029/160518.999379:WARNING:property.cc(150)] DaemonVersion: GetAndBlock: failed. [1029/160518.999475:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [1029/160518.999547:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [1029/160519.787873:ERROR:gl_implementation.cc(246)] Failed to load /opt/google/chrome/libosmesa.so: /opt/google/chrome/libosmesa.so: cannot open shared object file: No such file or directory [1029/160519.790114:ERROR:gpu_child_thread.cc(264)] Exiting GPU process due to errors during initialization [1029/160519.852964:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [1029/160519.852985:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [1029/160519.853018:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [1029/160519.853021:WARNING:property.cc(150)] DaemonVersion: GetAndBlock: failed. [1029/160519.853037:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [1029/160519.853050:ERROR:bus.cc(422)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory [1029/160520.170447:INFO:headless_shell.cc(464)] Written to file output.pdf. [1029/160520.176012:ERROR:media_internals.cc(107)] Cannot get RenderProcessHost
This probably just means that the dbus service isn't running on your machine. If you run sudo service messagebus restart
on CentOS 6 or Amazon Linux then it should hopefully resolve those errors. I wouldn't worry too much about the errors though, dbus should be used primarily for inter-process communication which would be used for desktop integration (e.g. notifications).
After installing the rpm on Amazon Linux, I'm getting the following error:
/usr/bin/google-chrome: symbol lookup error: /opt/google/chrome/lib/libgtk-3.so.0: undefined symbol: g_log_structured
Here's the specific linux version: Linux version 4.9.51-10.52.amzn1.x86_64 (mockbuild@gobi-build-64010) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Fri Sep 29 01:16:19 UTC 2017
Would appreciate any help in getting past this issue!
thanks for your share, when I execute the command on CentOS 6.6, I got the error message
...... --> Finished Dependency Resolution Error: Package: google-chrome-stable-60.0.3112.113-1.x86_64 (/google-chrome-stable-60.0.3112.113-1.x86_64) Requires: libc.so.6(GLIBC_2.14)(64bit) Error: Package: google-chrome-stable-60.0.3112.113-1.x86_64 (/google-chrome-stable-60.0.3112.113-1.x86_64) Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) Error: Package: google-chrome-stable-60.0.3112.113-1.x86_64 (/google-chrome-stable-60.0.3112.113-1.x86_64) Requires: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) Error: Package: google-chrome-stable-60.0.3112.113-1.x86_64 (/google-chrome-stable-60.0.3112.113-1.x86_64) Requires: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) Error: Package: google-chrome-stable-60.0.3112.113-1.x86_64 (/google-chrome-stable-60.0.3112.113-1.x86_64) Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) Error: Package: google-chrome-stable-60.0.3112.113-1.x86_64 (/google-chrome-stable-60.0.3112.113-1.x86_64) Requires: libc.so.6(GLIBC_2.15)(64bit)
Is it reasonable ? When I check with yum, the version of glibc seems should be 2.12
Should I build 2.14 and 2.15 on CentOs 6 ?
thanks for your reply
Then how run google-chrome?
The Google Chrome startup script is google-chrome-stable
. You will likely want to evoke it with the both --headless
and --disable-gpu
flags.
Used installer script, RHEL 6.9 up to date. tried to run chrome as
$ google-chrome-stable --headless --disable-gpu
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
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
After running google-chrome-stable --headless --disable-gpu
I receive no errors but nothing seems to happen. Also I am trying to find where Chrome was installed.
Any thoughts?
Thanks!
P.S Great article! Spent forever trying to find this
That's roughly what I would expect to happen if things are working. You'll either need to use a browser automation framework like Selenium, or connect to the browser instance via the Dev Tools Protocol to control the browser. You can verify that things are installed properly by including the --screenshot
. If the following outputs a file called screenshot.png
, then you should be good to go.
google-chrome-stable --headless --disable-gpu --screenshot https://intoli.com/blog/installing-google-chrome-on-centos/
I have Red Hat Enterprise Linux Server release 5.3 (Tikanga), Linux Bare Metal,
- curl https://intoli.com/install-google-chrome.sh | bash
- export LD_LIBRARY_PATH=/opt/google/chrome/lib/:$LD_LIBRARY_PATH
- google-chrome-stable --headless --disable-gp
I get the following error:
cat: relocation error: /opt/google/chrome/lib/libc.so.6: catsymbol _dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference: 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
Any help is much appreciated.
Installed - but I get this:
[0118/224629.251803:FATAL:nss_util.cc(631)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
Aborted
However - it would seem to me that I have nss 3.28 installed:
$ rpm -qa | grep nss-3
nss-3.28.4-12.80.amzn1.x86_64
nss-3.28.4-12.80.amzn1.i686
I installed the script using curl https://intoli.com/install-google-chrome.sh | bash
as per the Github comment
It finished with the number of errors, but the success message in the very end:
27647 blocks rm: 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 awk: 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 Finding dependency for arch: 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 /usr/bin/python: 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 arch: 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 referencearch: 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 sed: 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 sed: 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 wget: 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 cpio: 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 rpm2cpio: 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 rm: 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 find: 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 grep: 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 xargs: 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 rm: 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 awk: 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 Finding dependency for arch: 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 arch: 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 sed: 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 arch: 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 /usr/bin/python: 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 sed: 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 wget: 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 cpio: 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 rpm2cpio: 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 rm: 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 find: 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 grep: 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 xargs: 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 rm: 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 grep: 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 rm: 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 Successfully installed google-chrome-stable-63.0.3239.132-1.x86_64.rpm
When I try running the Chrome, the error comes back:
google-chrome-stable --version /bin/bash: 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
or:
google-chrome-stable --headless --disable-gpu --screenshot https://intoli.com/blog/installing-google-chrome-on-centos/ /bin/bash: 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
Here is the instance info:
$ cat /etc/system-release CentOS release 6.9 (Final) $ uname -a Linux phantomjsbuild2 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Any thoughts/suggestions are appreciated.
Thank you so much for the resource – it almost, almost works!
[ec2-user@ip-10-0-0-128 ~]$ cat /etc/system-release Amazon Linux AMI release 2017.09 [ec2-user@ip-10-0-0-128 ~]$ ldd /opt/google/chrome/chrome | grep 'not found' [ec2-user@ip-10-0-0-128 ~]$ google-chrome-stable --headless --disable-gpu --screenshot https://intoli.com/blog/installing-google-chrome-on-centos/ Failed to generate minidump.Illegal instruction [ec2-user@ip-10-0-0-128 ~]$
For lack of any better ideas I installed X11 and set up an ssh -X
forward to see what happens in non-headless mode. ¯\_(ツ)_/¯
[ec2-user@ip-10-0-0-128 ~]$ google-chrome-stable /opt/google/chrome/nacl_helper: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory [1:1:0124/101109.009694:ERROR:nacl_fork_delegate_linux.cc(315)] Bad NaCl helper startup ack (0 bytes) /usr/bin/google-chrome-stable: symbol lookup error: /opt/google/chrome/lib/libgdk-3.so.0: undefined symbol: g_type_add_instance_private
Could you share the specific AMI identifier that you're using?
Thanks, I'm on ami-910d72ed which is in ap-southeast-1; sorry I failed to mention that first time round. You should be able to repro with any of the ECS-optimized AMIs listed at https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html
I start by sudo yum install
ing wget zsh xauth xterm
Latest error:
google-chrome-stable-64.0.3282.119-1.x86_64.rpm | 49 MB 00:00:00 Downloaded google-chrome-stable-64.0.3282.119-1.x86_64.rpm ################################# [100%] Updating / installing... ################################# [100%] Error: Could not find xdg-icon-resource warning: %post(google-chrome-stable-64.0.3282.119-1.x86_64) scriptlet failed, exit status 1 --2018-01-29 09:50:18-- http://mirror.centos.org/centos/7/os/x86_64/Packages/glibc-2.17-196.el7.x86_64.rpm
My success conditions are to either run headless with chromedriver, or launch a GUI browser via X tunneled over ssh -Y
.
When I try to launch,
[ec2-user@ip-10-0-1-100 ~]$ google-chrome-stable /opt/google/chrome/nacl_helper: error while loading shared libraries: libXi.so.6: cannot open shared object file: No such file or directory [1:1:0129/095422.137553:ERROR:nacl_fork_delegate_linux.cc(316)] Bad NaCl helper startup ack (0 bytes) (google-chrome-stable:10141): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory This likely means that your installation is broken. Try running the command gdk-pixbuf-query-loaders > /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders.cache to make things work again for the time being. Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 84: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 93: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 102: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 68: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 79: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 88: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 23: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 39: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 66: Having multiple <family> in <alias> isn't supported and may not work as expected Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 75: Having multiple <family> in <alias> isn't supported and may not work as expected [10141:10155:0129/095422.695884:ERROR:bus.cc(394)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory [10141:10188:0129/095422.975827:ERROR:bus.cc(394)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") Trace/breakpoint trap
I do observe:
[root@ip-10-0-1-100]/opt/google/chrome# ls **/libgdk* lib/libgdk-3.so.0 lib/libgdk-3.so.0.2200.10 lib/libgdk_pixbuf-2.0.so.0 lib/libgdk_pixbuf-2.0.so.0.3600.5
Really appreciate the help, I would do more sleuthing but I'm going a little outside my comfort zone with the lib munging.
load more (2 remarks)
[root@api-centos7-agent2 ~]# google-chrome-stable --headless --disable-gpu --screenshot --no-sandbox https://intoli.com/blog/installing-google-chrome-on-centos/ [0130/024448.999192:ERROR:instance.cc(49)] Unable to locate service manifest for metrics [0130/024448.999259:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics [0130/024448.999467:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context. [0130/024449.240366:ERROR:instance.cc(49)] Unable to locate service manifest for metrics [0130/024449.240385:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics [0130/024451.391944:INFO:headless_shell.cc(566)] Written to file screenshot.png. [root@api-centos7-agent2 ~]
Hi,
Great article! Thank you for the very convenient script.
I ran the script against this AMI ID:
amzn-ami-hvm-2017.09.1.20180108-x86_64-gp2 (ami-32cf7b4a)
...which is a "Community AMI".
I got several errors, followed by: "Successfully installed google-chrome-stable, Google Chrome 64.0.3282.140 ."
I'm hesitant to feel confident that the installation of google-chrome-stable was successful when I see these errors outputted from the script:
Error: Package: google-chrome-stable-64.0.3282.140-1.x86_64 (google-chrome) Requires: libXss.so.1()(64bit) Error: Package: google-chrome-stable-64.0.3282.140-1.x86_64 (google-chrome) Requires: libgconf-2.so.4()(64bit) Error: Package: google-chrome-stable-64.0.3282.140-1.x86_64 (google-chrome) Requires: libgdk-3.so.0()(64bit) Error: Package: google-chrome-stable-64.0.3282.140-1.x86_64 (google-chrome) Requires: xdg-utils Error: Package: google-chrome-stable-64.0.3282.140-1.x86_64 (google-chrome) Requires: libatk-1.0.so.0()(64bit) Error: Package: google-chrome-stable-64.0.3282.140-1.x86_64 (google-chrome) Requires: libatk-bridge-2.0.so.0()(64bit) Error: Package: google-chrome-stable-64.0.3282.140-1.x86_64 (google-chrome) Requires: libgtk-3.so.0()(64bit) Error: Package: google-chrome-stable-64.0.3282.140-1.x86_64 (google-chrome) Requires: libgdk_pixbuf-2.0.so.0()(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest Error: Could not find xdg-icon-resource warning: %post(google-chrome-stable-64.0.3282.140-1.x86_64) scriptlet failed, exit status 1 --2018-02-03 15:37:06-- http://mirror.centos.org/centos/7/os/x86_64/Packages/glibc-2.17-196.el7.x86_64.rpm
I then decided to try 'ldd' on the installed /opt/google/chrome/chrome, and I saw several "not found" entries:
$ ldd /opt/google/chrome/chrome | grep "not found" libXcursor.so.1 => not found libXdamage.so.1 => not found libXfixes.so.3 => not found libcups.so.2 => not found libgconf-2.so.4 => not found libXrandr.so.2 => not found libXss.so.1 => not found libpangocairo-1.0.so.0 => not found libpango-1.0.so.0 => not found libcairo.so.2 => not found libatk-1.0.so.0 => not found libatk-bridge-2.0.so.0 => not found libgtk-3.so.0 => not found libgdk-3.so.0 => not found libgdk_pixbuf-2.0.so.0 => not found
So my questions are, if you please...
1) Are the installation error messages valid, or can they be safely ignored?
2) At the end of installation, is it expected that 'ldd /opt/google/chrome/chrome' should find all libraries (and so return no "not found" entries)?
3) When I run 'google-chrome-stable --headless --disable-gpu', I see these errors:
[0205/063813.098944:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context. [0205/063813.275826:ERROR:instance.cc(49)] Unable to locate service manifest for metrics [0205/063813.275847:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
... and I'm particularly concerned about the "Lost UI shared context" error. Could you please tell me what effect you think this error will have on the stability of the chrome installation? Do you think this is a serious error message? I googled for the message and found a page describing the error with the exact "1009" line number (error code?), which is at https://github.com/GoogleChrome/puppeteer/issues/1464, but the solution there was just to stop using python with proxychains, which isn't relevant in my case.
I did later run with --screenshot:
google-chrome-stable --headless --screenshot http://www.google.com --disable-gpu
...and it did generate a 'screenshot.png' file in my CWD, but I'm not sure whether the passing of this basic test is a good indicator that there are no major issues with the google chrome installation, given all the errors and the "not found" chrome binary dependencies.
I would very much appreciate your help and guidance on the above concerns. Thank you very much for all your efforts! :-)
1) Are the installation error messages valid, or can they be safely ignored?
These can definitely be safely ignored. The script tries a direct installation first, and this is expected to fail on any 6.X distribution. You'll see these errors whenever the script has to do something more complicated than just installing the RPM. The success message is only output if things actually worked. It checks that it's able to successfully run Chrome before outputting that message.
2) At the end of installation, is it expected that 'ldd /opt/google/chrome/chrome' should find all libraries (and so return no "not found" entries)?
This won't work in general because the system linker isn't aware of the self-contained library directory. The installation script puts all of the necessary libraries in /opt/google/chrome/lib/
. You'll potentially have better luck running LD_LIBRARY_PATH=/opt/google/chrome/lib/ ldd /opt/google/chrome/chrome
so that the linker knows where to look. That said, if the system linker is compiled with an incompatible glibc version, the installation script will actually bundle the linker from the CentOS 7 repository and patch the Chrome binaries to refer to the relocated linker in the INTERP
header. In that case, you might need to run something like LD_TRACE_LOADED_OBJECTS=1 LD_LIBRARY_PATH=/opt/google/chrome/lib/ /opt/google/chrome/lib/ld-linux.so.2 /opt/google/chrome/chrome
to actually reproduce the same linking behavior that would take place when you run the patched binaries.
3) When I run 'google-chrome-stable --headless --disable-gpu', I see these errors...
I'm honestly not sure exactly what these errors signify, but I can say that I've done a fair bit of testing with the relocated binaries and haven't had any issues.
THANK YOU! THANK YOU!
I have been trying to do this for years!!! At first I wasn't sure it was going to work. but I tired and I can finally run my python selenium script with the google-chrome on Amazon AMI Linux I only needed to do some simlpe cmds to add to the path ln -s /opt/google/chrome/google-chrome /usr/bin/google-chrome
Hi, I install chrome on an ec2 instance using the command curl https://intoli.com/install-google-chrome.sh | bash
and it seemed to be successful. However
I'm getting error messages trying to run google-chrome-stable --headless --disable-gpu --no-sandbox
on a centos ec2 instance
[0423/213433.372679:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context.
Fontconfig warning: "/etc/fonts/fonts.conf", line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf
Failed to generate minidump.[0100/000000.415274:ERROR:broker_posix.cc(43)] Invalid node channel message
Some system info:
uname -a
:
Linux 37fbcca1a891 4.9.58-18.55.amzn1.x86_64 #1 SMP Thu Nov 2 04:38:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
google-chrome-stable --version
:
Google Chrome 66.0.3359.117
cat /etc/os-release
:
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"
Any help is greatly appreciated!
this article is still GREAT, however, there are no rpm package named google-chrome-stable
now.
so this script fails at below code.
yumdownloader google-chrome-stable
you can change this line like below, download rpm package directly.
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
Stopped working for me just now. Last output lines:
Making all in tests
make[1]: Entering directory `/tmp/google-chrome-installation/patchelf-0.9/tests'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/google-chrome-installation/patchelf-0.9/tests'
make[1]: Entering directory `/tmp/google-chrome-installation/patchelf-0.9'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/tmp/google-chrome-installation/patchelf-0.9'
stat: No such file or directory
stat: No such file or directory
sed: can't read /opt/google/chrome/google-chrome: No such file or directory
Attempted experimental patching of Chrome to use a relocated glibc version.
bash: line 201: google-chrome-stable: command not found
Installation has failed.
Please email contact@intoli.com with the details of your operating system. If you're using using AWS, please include the AMI identifier for the instance.
UPDATE: The upstream issue has been resolved, and everything should be working again.
Hey everybody, there's currently an upstream issue with the Google Chrome Yum repository. If you would like to get this resolved quickly, the best thing you can do right now is to leave a comment at this link confirming that you're experiencing the same problem (or at least vote for the issue).
In the meantime, I've updated the script to download the RPM directly using the link that @posaunehm's provided. The script should be working again for the time being, let me know if you run into any other issues.
Could you write such scripts for Iron browser and Visual Studio Code? It would be nice!
Thank you in advance
The dependencies for Iron Browser should be mostly the same because its based on Chromium. This means that you should be able to update the installer script to install the dependencies in a similar way. We unfortunately don't have the time to spend on that right now, but feel free to get in touch with us if you're interested in contracting the development.
Thank you for this script! Just tried running on RHEL 6.9 and got the following.
Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libXinerama.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Finding dependency for libXinerama.so.1 Finding dependency for libbz2.so.1 Could not match packages: Cannot retrieve repository metadata (repomd.xml) for repository: centos7. Please verify its path and try again Finding dependency for libcairo-gobject.so.2 Finding dependency for libcairo-gobject.so.2 Could not match packages: Cannot retrieve rep
Thank you so much for this script! I was wondering what will be the process to fully remove it from instance?
The following should completely remove Chrome from the instance.
# Uninstall the package. sudo yum --setopt=tsflags=noscripts -y remove google-chrome-stable # Remove any leftover files. sudo rm -rf /opt/google/chrome/
The one tricky part here is specifying the tsflags=noscripts
option. This is necessary because the normal uninstall script included in the Chrome package will try to run some XDG utilities which most likely aren't installed on the system.
After installing install-google-chrome.sh. My ec2 instance getting this errors:
** Found 8 pre-existing rpmdb problem(s), 'yum check' output follows: google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libXss.so.1()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libappindicator3.so.1()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libatk-1.0.so.0()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libatk-bridge-2.0.so.0()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libgdk-3.so.0()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libgdk_pixbuf-2.0.so.0()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libgtk-3.so.0()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of xdg-utils
Should I try manually fixing them as you described? It seems that your script already taking care of it.
These errors are expected because the package is installed with unsatisfied dependencies. The missing dependencies are installed inside of the /opt/google/chrome/
directory, and the Chrome launcher is modified to look for the local dependencies before using the system dependencies. You should be able to safely ignore these errors.
Hi. I'm getting the following error:
Error: Failed to launch chrome! /home/admin/nodejs/crawlV1/node_modules/puppeteer/.local-chromium/linux-575458/chrome-linux/chrome: symbol lookup error: /usr/lib64/libgtk-3.so.0: undefined symbol: g_type_add_instance_private [1024/071431.947930:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! Most likely you need to configure your SUID sandbox correctly
Help you please!
This is happening because you're using the local Puppeteer version of Chromium instead of the one that the script installs. You'll need to tell Puppeteer to use /opt/google/chrome/google-chrome
instead. You need to launch Puppeteer with the executablePath
option.
const browser = await puppeteer.launch({ executablePath: '/opt/google/chrome/google-chrome', });
Thank you for the script! On yum update
I am getting this errors. Actual script works fine
Error: Package: google-chrome-stable-70.0.3538.67-1.x86_64 (google-chrome) Requires: liberation-fonts Error: Package: google-chrome-stable-70.0.3538.67-1.x86_64 (google-chrome) Requires: libappindicator3.so.1()(64bit) Error: Package: google-chrome-stable-70.0.3538.67-1.x86_64 (google-chrome) Requires: libgdk-3.so.0()(64bit) Error: Package: google-chrome-stable-70.0.3538.67-1.x86_64 (google-chrome) Requires: libXss.so.1()(64bit) Error: Package: google-chrome-stable-70.0.3538.67-1.x86_64 (google-chrome) Requires: libgdk_pixbuf-2.0.so.0()(64bit) Error: Package: google-chrome-stable-70.0.3538.67-1.x86_64 (google-chrome) Requires: xdg-utils Error: Package: google-chrome-stable-70.0.3538.67-1.x86_64 (google-chrome) Requires: libgtk-3.so.0()(64bit) Error: Package: google-chrome-stable-70.0.3538.67-1.x86_64 (google-chrome) Requires: libatk-bridge-2.0.so.0()(64bit) Error: Package: google-chrome-stable-70.0.3538.67-1.x86_64 (google-chrome) Requires: libatk-1.0.so.0()(64bit) You could try using --skip-broken to work around the problem ** Found 8 pre-existing rpmdb problem(s), 'yum check' output follows: google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libXss.so.1()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libappindicator3.so.1()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libatk-1.0.so.0()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libatk-bridge-2.0.so.0()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libgdk-3.so.0()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libgdk_pixbuf-2.0.so.0()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of libgtk-3.so.0()(64bit) google-chrome-stable-69.0.3497.100-1.x86_64 has missing requires of xdg-utils
These errors are expected based on how the installer script works. You can see more details in this other comment. You could either skip the broken dependencies, or uninstall Chrome before the update and then reinstall it afterwards. Neither of those are ideal, and we would be happy to update the script if somebody knows a better way to address this.
Please consider adding latest chromedriver to the installation. I hacked your script to make it download dependencies for chromedriver after installation, however my bash skills suck hard to make it download chromedriver , elfpatch it , check for errors etc .
anyway , fantastic job.
This is an insane process but it worked for me.
prompt> google-chrome-stable --version Google Chrome 70.0.3538.110 prompt> cat /etc/redhat-release CentOS release 6.9 (Final) prompt>
Patching to use a different glibc is something I would have never considered on my own.
I'm glad that it worked for you. If you want to see this particular flavor of insanity taken to the extreme, then you should check out Exodus. It makes it extremely easy to transfer working binaries between different Linux machines and distributions. It's unfortunately not able to support something as complex as Chrome, but it works great for simpler programs.
We found a bug today in which this line actually returns two packages, separated via a new line (replace $file with "libwayland-egl.so.1" to see this in action):
package=$(repoquery --repofrompath=centos7,http://mirror.centos.org/centos/7/os/
arch\
--repoid=centos7 -q --qf="%{name}" --whatprovides "$file")
We're not sure if that's intended behavior or not from repoquery, but it causes the install_package function to fail. Our fix was to simply take the first package whenever this occurs. E.g. add the following above install_package "${package}"
in the install_missing_dependencies function:
# If multiple packages are returned, choose the 1st one.
package=(${package//$'\n'/ })
Thanks a lot for the article and the provided script. I'm using if for quite some time to install google chrome on EMR machines.
Lately the script doesn't finish and ends in an endless loop:
Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 ...
The reason is that the repoquery to find libwayland-egl.so.1
package returns 2 lines
$ package=$(repoquery --repofrompath=centos7,http://mirror.centos.org/centos/7/os/`arch` \ --repoid=centos7 -q --qf="%{name}" --whatprovides "$file") $ echo $package mesa-libwayland-egl libwayland-egl
Adding | head -n 1
to the query solved it for me.
I tried to find the script in intoli's github repo to submit a PR, but I couldn't find the article :)
Hey! Great script, thanks for your hard work. I tried running this ssh-d into my elastic-beanstalks worker on aws.
I need to be able to run chrome headless to launch puppetteer, and eventually google lighthouse, on my ec2 node instance.
Node.js running on 64bit Amazon Linux/4.7.0
AMI AWS EC2
The script runs up until this point where it hangs:
Finding dependency for libwayland-egl.so.1
Finding dependency for libwayland-egl.so.1
Finding dependency for libwayland-egl.so.1
Finding dependency for libwayland-egl.so.1
Finding dependency for libwayland-egl.so.1
...
This message is printed repeadtedly in an infinite loop, crashing the program. I've looked on http://mirror.centos.org/centos/7/os/x86_64/Packages/ and there is no exact package mathcing the one it is searching for, which is I guess why the script hangs.
Do you have a suggested solution or fix for this? My plan will be, once I can run the script by ssh, to run the script in a config file on deploy so that new instances spawned by auto-scaling have the same configuration and are also able to run chrome properly.
Hi. At first of all I should say Thanks a lot to the author of such great script.
And the I'm asking for help with installing chrome on AWS Linux (Elasticbeanstalk).
This week I got an error during installing the chrom with the next command in .ebextension file
curl https://intoli.com/install-google-chrome.sh | bash
I got a lop of messages:
Extracting graphite2... Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 ...
My OS is
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" CPE_NAME="cpe:/o:amazon:linux:2018.03:ga" HOME_URL="http://aws.amazon.com/amazon-linux-ami/" Amazon Linux AMI release 2018.03
Maybe somebody know how can I solve the issue?
When I execute the script (curl https://intoli.com/install-google-chrome.sh | bash), it gets stuck at the following: Extracting graphite2... Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1 Finding dependency for libwayland-egl.so.1
I would greatly appreciate your help with libwayland-egl.so.1. "Finding dependency for libwayland-egl.so.1" continues printing indefinitely. Thank you.
Edit: See below output:
repoquery --repofrompath=centos7,http://mirror.centos.org/centos/7/os/arch
--repoid=centos7 -q --qf="%{name}" --whatprovides libwayland-egl.so.1
mesa-libwayland-egl
libwayland-egl
arch x86_64
This has been working perfectly on Amazon Linux AMI until a few days ago. Now it results in an infinite loop with the following packages still required:
libXss.so.1 => not found libatk-1.0.so.0 => not found libatk-bridge-2.0.so.0 => not found libatspi.so.0 => not found libgtk-3.so.0 => not found libgdk-3.so.0 => not found libgdk_pixbuf-2.0.so.0 => not found
Doing it the easy way eventually ends up repeating logs in this way:
Extracting graphite2... Finding dependency for libwayland-egl.so.1 Failed to set locale, defaulting to C Finding dependency for libwayland-egl.so.1 Failed to set locale, defaulting to C etc...
Doing it the hard way logs a lot more, but to the same effect.
This has been working perfectly on Amazon Linux AMI until a few days ago. Now it results in an infinite loop with the following packages still required:
libXss.so.1 => not found libatk-1.0.so.0 => not found libatk-bridge-2.0.so.0 => not found libatspi.so.0 => not found libgtk-3.so.0 => not found libgdk-3.so.0 => not found libgdk_pixbuf-2.0.so.0 => not found
Doing it the easy way eventually ends up repeating logs in this way:
Extracting graphite2... Finding dependency for libwayland-egl.so.1 Failed to set locale, defaulting to C Finding dependency for libwayland-egl.so.1 Failed to set locale, defaulting to C Finding dependency for libwayland-egl.so.1 Failed to set locale, defaulting to C etc...
Doing it the hard way logs a lot more, but to the same effect.
aws-elasticbeanstalk-amzn-2018.03.0.x86_64-nodejs-hvm-201809240334 (ami-082a882e8218eb8ec)
We had a new failure today, where RPM files were failing to download, but wget created a 0-byte file anyway. The script avoids re-downloading if the file already exists, so this meant it looped infinitely waiting for all dependencies to be installed. I added a removal if the extraction failed:
# Extract it. echo "Extracting $1..." rpm2cpio $1.rpm | cpio -idmv > /dev/null 2>&1 extract_status=$? # Remove a broken RPM to avoid caching it if [ $extract_status -ne 0 ]; then echo "FAILED, removing $1.rpm..." rm -f $1.rpm fi
This forces install_package to re-download the file, which fixed the problem.
thanks for the great article!But I get some problem.
My system is CentOS6.8. And run curl https://intoli.com/install-google-chrome.sh | bash without error. When I run google-chrome-stable --headless --disable-gpu --screenshot \ https://intoli.com/blog/installing-google-chrome-on-centos/ There is nothing output and no screenshot file in current directiory. Then I click Applications -> Internet -> Google Chrome,can't open chrome and no error message. What can I do now? Thanks!
The latest version of Google Chrome has broken our version of this script again.
google-chrome-stable --version
/usr/bin/google-chrome-stable: symbol lookup error: /usr/bin/google-chrome-stable: undefined symbol: atk_window_get_type
When running ldd, libatk-1.0.so.0 is shown:
libatk-1.0.so.0 => /usr/lib64/libatk-1.0.so.0
However, that seems to be the incorrect version. Going through the process of grabbing that dependency from the repo works. (cksum confirms these are different files).
It seems that ldd is no longer sufficient on its own for getting dependencies.
Edit to update: Adding the following to the script works with Chrome 72 (note this step must be done before install_missing_dependencies is called):
function install_dependency() { file=$1 echo "Finding dependency for ${file}" # Find the package name for this library. package=$(repoquery --repofrompath=centos7,http://204.10.37.194/centos/7/os/`arch` \ --repoid=centos7 -q --qf="%{name}" --whatprovides "$file" | head -n1) install_package "${package}" # Copy it over to our library directory. find . | grep /${file} | xargs -n1 -I{} cp {} ${lib_directory}/ } # try resolving dependencies with objdump first lines="$(objdump -p "${executable}" | grep "NEEDED")" while read -r line ; do file=`echo $line | awk '{print $2;}'` if [ ! -f "${lib_directory}/${file}" ]; then install_dependency "${file}" fi done <<< "$lines"
Request: a public repo. Posting here for updates/issues isn't the easiest experience. If necessary, I/One Medical don't mind hosting as long as I/we have permission. I'm not a lawyer so I'm not 100% sure the current notice allows me to distribute that widely.
This has been requested a few times, and I agree that it makes sense to make it a public repo so that people can submit issues and pull requests. We'll put this up in the near future and we're hoping to work with the community to keep the script useful. If anybody is particularly interested in being part of the project, then shoot me an email at evan@intoli.com.