**[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