The easiest way to install Chrome on CentOS 6

**[Reprint, please indicate the source]: **https://blog.csdn.net/huahao1989/article/details/107967581

Today, a colleague said: "Brother Long, I want to install Chrome on CentOS 6.5. Two days ago, you can help me see." When I heard this, I remember that I needed to build a Chrome-based crawler on CentOS 6.5 a long time ago, and it took a lot of effort. The Chrome official website has long suggested that at least CentOS7 is installed, and a dependency package is installed. At that time, I found that another dependency package was needed. Various dependencies were very laborious. Later, I found a version that supports CentOS 6, which was considered a perfect solution. Today, it is considered to be a re-run and record.

Directly to a network disk

Link: https://pan.baidu.com/s/1zxbWDw1mlUbdmh-bdnDYEg Extraction code: ggyu

Download two files first, then execute the following command to install

rpm -i chrome-deps-stable-3.11-1.x86_64.rpm
rpm -i --force --nodeps google-chrome-stable_current_x86_64.rpm

If no error is reported, congratulations on the completion of the installation.

Under normal circumstances, it may prompt that the glibc version is low, then upgrade

strings /lib64/libc.so.6| grep GLIBC
# Check the existing version first
wget http://ftp.gnu.org/gnu/glibc/glibc-2.17.tar.gz
tar -zxvf glibc-2.17.tar.gz
cd glibc-2.17
mkdir build
cd build
.. /configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin 
make 
make install

If it appears

Can't open configuration file /usr/etc/ld.so.conf: No such file or directory

enter:

touch /usr/etc/ld.so.conf/etc/ld.so.conf 
sudo cp -r  /etc/ld.so.c*/usr/etc/
sudo ln -sf /usr/lib/libc-2.17.so /lib64/libc.so.6

If you execute any command here, it will appear

error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument

Then execute the following command to go back first

cd /lib64
LD_PRELOAD=/lib64/libc-2.12.so ln -fs /lib64/libc-2.12.so /lib64/libc.so.6 
LD_PRELOAD=/lib64/libc-2.12.so ln -s ld-2.12.so ld-linux-x86-64.so.2 
LD_PRELOAD=/lib64/libc-2.12.so ln -s libc-2.12.so libc.so.6  
LD_PRELOAD=/lib64/libc-2.12.so ln -s libBrokenLocale-2.12.so libBrokenLocale.so.1
LD_PRELOAD=/lib64/libc-2.12.so ln -s  ld-2.12.so ld-linux-x86-64.so.2

At this time, you must upgrade the gcc version

wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2
tar -jxvf gcc-4.8.2.tar.bz2
cd gcc-4.8.2./contrib/download_prerequisites
# This script will automatically download the three dependencies of gmp, mpfr and mpc needed to compile gcc. If the network is not good and cannot be downloaded, it is recommended to manually download to the current directory, comment out the 3 wgets in this script, and execute it again.
mkdir build
cd build
.. /configure -enable-checking=release -enable-languages=c,c++-disable-multilib
make
make install

Now gcc has also been upgraded. If you go back and upgrade libc, it will be no problem. Installing Chrome should be no problem. If it still prompts that the dependency package is missing, please go to http://ftp.gnome.org/pub/gnome/sources/ to download and install.

After installation, it will appear when starting with root user

Chromium can not be run as root

Need to modify a file

cd /opt/chromium-browser/
vi chromium-browser.sh

turn up

exec -a "$0""$HERE/chromium-browser" $CHROMIUM_RHEL_FLAGS "$@"

Add --user-data-dir later and change it to

exec -a "$0""$HERE/chromium-browser" $CHROMIUM_RHEL_FLAGS "$@"--user-data-dir

It should be right now.

Personally, I suggest using CentOS 7 to install it. If there is no upgrade, it will be troublesome.

Welcome to pay attention to the "back-end veteran" public account, and a series of special articles will be published, including Java, Python, Linux, SpringBoot, SpringCloud, Dubbo, algorithms, management of technical teams, etc., as well as various brain maps and learning Information, NFC technology, search technology, crawler technology, recommendation technology, audio and video interactive live broadcast, etc., as long as I have time, I will organize and share, so stay tuned, ready-made notes, brain maps and learning materials can also be public account if you need them Get the message in advance. Since I am basically in the role of tackling tough spots and pathfinders in all teams, I have done many things, encountered many pitfalls, and solved many problems. Welcome everyone to join the group to exchange and learn.

**【Reprint, please indicate the source】: **https://blog.csdn.net/huahao1989/article/details/107967581

Recommended Posts

The easiest way to install Chrome on CentOS 6
Install NeoVim on Ubuntu: the easiest way
How to install Google Chrome web browser on CentOS 8
How to install jdk1.8 on centOS7
How to install MySQL on CentOS 8
How to install Memcached on CentOS 8
How to install R on CentOS 8
How to install Virtualbox on CentOS 8
How to install TensorFlow on CentOS 8
How to install TeamViewer on CentOS 8
How to install Perl 5 on CentOS
How to install Git on CentOS 8
How to install Gradle on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
How to install GCC on CentOS 8
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
How to install Jenkins on CentOS 8
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Tomcat 9 on CentOS 8
How to install Webmin on CentOS 8
How to install Ruby on CentOS 8
How to install Skype on CentOS 8
How to install htop on CentOS 8
How to install Python on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Postgresql on CentOS 8
How to install Wordpress on Centos
How to install htop on CentOS 8
How to install TeamViewer on CentOS 8
How to install MariaDB on CentOS 8
How to install MongoDB on CentOS 7
How to install Odoo 13 on CentOS 8
How to install Apache on CentOS 8
How to install OpenCV on CentOS 8
How to install PHP on CentOS 8
How to install MongoDB on CentOS 8
Install Jenkins on linux centos (non-docker way)
How to install Apache Maven on CentOS 8
How to install Apache Kafka on CentOS 7
[Graphic] How to install tomcat on centos
R&D: How To Install Python 3 on CentOS 7
How to install GCC compiler on CentOS 7
How to modify the hostname on CentOS 8
How to install offline JDK1.8 on centos7.0
CentOS7 system yum way to install MySQL5.7
Install Docker on Centos7
install LNMP on centos7.4
How to install and configure Elasticsearch on CentOS 7
Install Java on Centos 7
How to install Visual Studio Code on CentOS 8
How to install and use Docker on CentOS 7
How to install RPM packages on CentOS Linux
Install FFmpeg on CentOS 8
Install RabbitMQ on CentOS 7
Install Node.js on Centos
How to install and use Composer on CentOS 8