Google Chrome 不會出現在應用程式或「網路」部分 - Ubuntu 18.04.03

Google Chrome 不會出現在應用程式或「網路」部分 - Ubuntu 18.04.03

Google Chrome 已在執行 Ubuntu 18.04 的虛擬機器上重新安裝,但在確認安裝後,該圖示不會出現在應用程式或功能表列的「網際網路」部分。

如果我跑步dpkg -l | grep google我會看到:

'google-chrome-stable' with current version installed ( 79.03945.88-1 ) pulled directly from their download site. 

有趣的是我可以運行sudo /usr/bin/google-chrome-stable --no-sandbox並打開瀏覽器,但是我不希望使用此標誌運行,因為我希望從應用程式圖示中開啟它。我傾向於將快捷方式放在系統托盤中。

我卸載了 Chromium 和 Firefox,看看它們是否也在複製。他們不是。 Chromium 運作良好。 Chrome 與 Chromium 並沒有重複同樣的問題。

你問這一切是怎麼開始的?我所記得的只是無意中單擊並拖動了 chrome 圖標,然後再也沒有看到該圖標/瀏覽器。

我什至不確定我會查看哪些日誌來告訴我更多有關所經歷的事情。

我嘗試了一些不同的方法,例如按以下順序使用 apt-get 刪除:

  1. 驗證已安裝的軟體包:dpkg -l
  2. 刪除包:sudo apt-get remove 'google-chrome-stable'
  3. 清除相關代碼:sudo apt-get purge 'google-chrome-stable'
  4. 自動刪除:sudo apt-get autoremove
  5. 乾淨的:sudo apt-get clean

我嘗試按照指示重新安裝在 Ubuntu 18.04 LTS Bionic Beaver 上安裝 Google Chrome 的 2 種方法,但應用程式或“互聯網”中仍然沒有圖標出現。

答案1

第 1 步:按Ctrl Alt t開啟終端機。

步驟2:輸入指令建立桌面文件chrome.desktop

nano ~/.local/share/applications/chrome.desktop

步驟 3:將以下內容插入該文件:

[Desktop Entry]
Type=Application
Terminal=false
Exec=/usr/bin/google-chrome
Name=Google Chrome
Icon=/usr/share/icons/hicolor/48x48/apps/google-chrome.png

步驟 4 - 透過執行以下命令使其可執行:

chmod +x ~/Desktop/chrome.desktop

第 5 步 - 按一下此按鈕

按鈕

答案2

我在 Ubuntu 20.04 LTS 上遇到了同樣的問題:在 Dash 上上下移動圖示後,Google Chrome 圖示消失了(其他圖示也遺失了)。我嘗試刪除並再次安裝 google-chrome-stable,但沒有成功,圖標不存在。我只能開始使用sudo和參數--no-sandbox

我最終刪除了該/opt/google/chrome目錄並按照 Google Chrome 網站上的說明再次運行安裝https://www.google.com/chrome/。該圖示重新出現在 Dash 上並按預期工作。

答案3

我今天安裝 nvidia-drivers 後遇到了同樣的問題。我嘗試了上述解決方案,但沒有一個對我有用。最後,我透過刪除瀏覽器的快取資料夾(應該位於 )來解決該問題$HOME/.cache/google-chrome

做就是了:

rm -r "$HOME/.cache/google-chrome"

相關內容