Ubuntu 17.10 卸载自带Firefox安装Chrome
1.卸载Firefox
查找火狐浏览器的安装包内容
dpkg - - get - selections |grep firefox
注意: dpkg - - get - selections |grep 为查找安装包内容的指令,后面加上安装包名称。
可以看到,火狐浏览器共有4个安装小包:firefox,firefox-locale-en ,firefox-locale-zh-hans ,unity-scope-firefoxbookmarks
卸载安装小包
sudo apt-get purge firefox firefox-locale-en firefox-locale-zh-hans unity-scope-firefoxbookmarks
注意:sudo apt-get purge 为卸载安装小包的指令,后面要加上安装小包的名称。
2.安装chrome
通过直接下载安装Google Chrome浏览器deb包。打开Ubuntu终端,使用下面的命令。
#32位 wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb #64位 wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
下载完成后,进行安装:
#32位 sudo dpkg -i google-chrome-stable_current_i386.deb #64位 sudo dpkg -i google-chrome-stable_current_amd64.deb
3.解决root身份不能打开chrome的问题
安装完成后,如果在root状态下,无法启动chrome。
如果从终端启动,这时会报错:
google-chrome
[31560:31560:0207/085601.085852:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
google-chrome --no-sandbox
仍会报错:
root@node00:~# [0207/085735.495265:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
google-chrome --no-sandbox
虽然也是有一堆错,但是终于成功打开了!!
[31568:31664:0207/085622.436523: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")
[31568:31568:0207/085624.050190:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context.
(google-chrome:31568): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Unknown or unsupported transport 'disabled' for address 'disabled:'
root@node00:~# [0207/085735.495265:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
whereis google-chrome
google-chrome: /usr/bin/google-chrome /usr/share/man/man1/google-chrome.1.gz
vim /usr/bin/google-chrome
将 exec -a "$0" "$HERE/chrome" "$@" 改为
exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --no-sandbox
以后只要 google-chrome 就可以打开Chrome了
参考链接:
https://blog.csdn.net/qq_41149269/article/details/81175948