install firefox on centos

1. Delete the old version of firefox installed by default in the system, usually located in the /usr/lib or /usr/lib64 directory, you can see which one is through whereis firefox.

2. Uninstall firefox: rm -rf /usr/lib64/firefox

3. Download the new version of firefox and unzip it.

[root@centos6-5vm download]# tar -xjvf Firefox-latest.tar.bz2

4. Copy the directory to the /usr/lib directory.

[root@centos6-5vm download]# mv firefox /usr/lib64

5. Enter the /usr/bin directory, delete the firefox script under it, go back to the home directory or root directory, and create a soft link pointing to /usr/lib/firefox/firefox

[root@centos6-5vm download]# cd /usr/bin
[root@centos6-5vm bin]# ll firefox
-rwxr-xr-x. 1 root root 6546 10月 30 2013 firefox
[root@centos6-5vm bin]# rm firefox 
rm: delete normal file "firefox"? y
[root@centos6-5vm bin]# cd
[root@centos6-5vm ~]# ln -s /usr/lib/firefox/firefox /usr/bin/firefox
6. Execute the firefox command in the shell terminal to start the latest version of firefox (make sure that all old firefox processes have been terminated before starting)
[root@centos6-5vm ~]# firefox

If there is the following error message

[root@test firefox]# firefox 

XPCOMGlueLoad error for file /usr/lib64/firefox/libmozgtk.so:
libgtk-3.so.0: cannot open shared object file: No such file or directory

Couldn't load XPCOM.

solution:

[root@test bin]# yum install gtk2
If it still gives an error:
Error Downloading Packages:   elfutils-libs-0.164-2.el6.x86_64: failure: Packages/elfutils-libs-0.164-2.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.

1: Execute yum clean all to clear the packages and old headers in the cache directory;

2: Then execute yum list to re-list all installed and installable packages;

3: Re-execute the above command and find that the yum compilation is successful;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324853995&siteId=291194637