1. 添加源地址 ,在/etc/apt/sources.list 里面 最后添加
deb http://downloads.sourceforge.net/project/Ubuntuzilla/mozilla/apt all main
2. 添加key
# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
3. 更新
# apt-get update
4. 安装firefox
# apt-get install firefox-mozilla-build
提示错误
dpkg-divert: `diversion of /usr/bin/firefox to /usr/bin/firefox.ubuntu by firefox-mozilla-build' clashes with `diversion of /usr/bin/firefox to /usr/bin/firefox.real by iceweasel'
dpkg: error processing /var/cache/apt/archives/firefox-mozilla-build_15.0-0ubuntu1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 2
configured to not write apport reports
dpkg-divert: mismatch on divert-to
when removing `diversion of /usr/bin/firefox to /usr/bin/firefox.ubuntu by firefox-mozilla-build'
found `diversion of /usr/bin/firefox to /usr/bin/firefox.real by iceweasel'
dpkg: error while cleaning up:
subprocess new post-removal script returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/firefox-mozilla-build_15.0-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
原来是iceweasel和firefox15冲突了.新的不能覆盖掉,那就remove掉
# apt-get remove iceweasel
root@debian:/etc/apt# apt-get remove iceweasel
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
iceweasel
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/22.0 MB of archives.
After this operation, 4,092 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ...
dpkg: warning: files list file for package `firefox-mozilla-build' missing, assuming package has no files currently installed.
(Reading database ... 126622 files and directories currently installed.)
Preparing to replace firefox-mozilla-build 15.0-0ubuntu1 (using .../firefox-mozilla-build_15.0-0ubuntu1_amd64.deb) ...
Unpacking replacement firefox-mozilla-build ...
Processing triggers for gnome-menus ...
Processing triggers for desktop-file-utils ...
(Reading database ... 126696 files and directories currently installed.)
Removing iceweasel ...
Removing 'diversion of /usr/bin/firefox to /usr/bin/firefox.real by iceweasel'
Processing triggers for menu ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Processing triggers for gnome-menus ...
Processing triggers for desktop-file-utils ...
deb http://downloads.sourceforge.net/project/Ubuntuzilla/mozilla/apt all main
2. 添加key
# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
3. 更新
# apt-get update
4. 安装firefox
# apt-get install firefox-mozilla-build
提示错误
dpkg-divert: `diversion of /usr/bin/firefox to /usr/bin/firefox.ubuntu by firefox-mozilla-build' clashes with `diversion of /usr/bin/firefox to /usr/bin/firefox.real by iceweasel'
dpkg: error processing /var/cache/apt/archives/firefox-mozilla-build_15.0-0ubuntu1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 2
configured to not write apport reports
dpkg-divert: mismatch on divert-to
when removing `diversion of /usr/bin/firefox to /usr/bin/firefox.ubuntu by firefox-mozilla-build'
found `diversion of /usr/bin/firefox to /usr/bin/firefox.real by iceweasel'
dpkg: error while cleaning up:
subprocess new post-removal script returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/firefox-mozilla-build_15.0-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
原来是iceweasel和firefox15冲突了.新的不能覆盖掉,那就remove掉
# apt-get remove iceweasel
root@debian:/etc/apt# apt-get remove iceweasel
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
iceweasel
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/22.0 MB of archives.
After this operation, 4,092 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ...
dpkg: warning: files list file for package `firefox-mozilla-build' missing, assuming package has no files currently installed.
(Reading database ... 126622 files and directories currently installed.)
Preparing to replace firefox-mozilla-build 15.0-0ubuntu1 (using .../firefox-mozilla-build_15.0-0ubuntu1_amd64.deb) ...
Unpacking replacement firefox-mozilla-build ...
Processing triggers for gnome-menus ...
Processing triggers for desktop-file-utils ...
(Reading database ... 126696 files and directories currently installed.)
Removing iceweasel ...
Removing 'diversion of /usr/bin/firefox to /usr/bin/firefox.real by iceweasel'
Processing triggers for menu ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Processing triggers for gnome-menus ...
Processing triggers for desktop-file-utils ...
Setting up firefox-mozilla-build (15.0-0ubuntu1) ...
然后打开你的电脑左上角的Application-->Internet,里面已经有firefox了
或者在终端运行命令: firefox就可以打开firefox浏览器了