Ubuntu 17.10 卸載自帶Firefox安裝Chrome


1.卸載Firefox

查找火狐瀏覽器的安裝包內容

dpkg - - get - selections  |grep firefox

注意: dpkg - - get - selections  |grep 為查找安裝包內容的指令,后面加上安裝包名稱。

Firefox

可以看到,火狐瀏覽器共有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 為卸載安裝小包的指令,后面要加上安裝小包的名稱。

Firefox

 

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

https://blog.csdn.net/sdujava2011/article/details/50880663

https://blog.csdn.net/s_sunnyy/article/details/79276480


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM