1.執行sudo minikube dashboard報錯
(1)錯誤:failed to open browser: exit status 3
🔌 Enabling dashboard ...
🤔 Verifying dashboard health ...
🚀 Launching proxy ...
🤔 Verifying proxy health ...
🎉 Opening http://127.0.0.1:44577/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ in your default browser...
Running Firefox as root in a regular user's session is not supported. ($XAUTHORITY is /run/user/1000/gdm/Xauthority which is owned by hxl.)
Running Firefox as root in a regular user's session is not supported. ($XAUTHORITY is /run/user/1000/gdm/Xauthority which is owned by hxl.)
Running Firefox as root in a regular user's session is not supported. ($XAUTHORITY is /run/user/1000/gdm/Xauthority which is owned by hxl.)
/usr/bin/xdg-open: 869: iceweasel: not found
/usr/bin/xdg-open: 869: seamonkey: not found
/usr/bin/xdg-open: 869: mozilla: not found
/usr/bin/xdg-open: 869: epiphany: not found
/usr/bin/xdg-open: 869: konqueror: not found
/usr/bin/xdg-open: 869: chromium: not found
/usr/bin/xdg-open: 869: chromium-browser: not found
/usr/bin/xdg-open: 869: google-chrome: not found
/usr/bin/xdg-open: 869: www-browser: not found
/usr/bin/xdg-open: 869: links2: not found
/usr/bin/xdg-open: 869: elinks: not found
/usr/bin/xdg-open: 869: links: not found
/usr/bin/xdg-open: 869: lynx: not found
/usr/bin/xdg-open: 869: w3m: not found
xdg-open: no method available for opening 'http://127.0.0.1:44577/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/'
❌ failed to open browser: exit status 3
(2)原因+解決:
①沒有安裝Chrome,安裝:
#將下載源加入到系統的源列表
sudo wget http://www.linuxidc.com/files/repo/google-chrome.list -P /etc/apt/sources.list.d/
#導入谷歌軟件的公鑰,用於下面步驟中對下載軟件進行驗證
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
#對當前系統的可用更新列表進行更新
sudo apt-get update
這里執行報錯,解決 sudo gedit /etc/apt/sources.list.d/google-chrome.list 刪掉https://repo.fdzh.org/chrome/deb stable InRelease即可:
錯誤:5 https://repo.fdzh.org/chrome/deb stable InRelease 403 Forbidden [IP: 104.28.0.34 443] 獲取:6 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB] 正在讀取軟件包列表... 完成 N: 忽略‘google-chrome.list.1’(於目錄‘/etc/apt/sources.list.d/’),鑒於它的文件擴展名無效 E: 無法下載 https://repo.fdzh.org/chrome/deb/dists/stable/InRelease 403 Forbidden [IP: 104.28.0.34 443] E: 倉庫 “https://repo.fdzh.org/chrome/deb stable InRelease” 沒有數字簽名。 N: 無法安全地用該源進行更新,所以默認禁用該源。 N: 參見 apt-secure(8) 手冊以了解倉庫創建和用戶配置方面的細節。
#執行對谷歌 Chrome 瀏覽器(穩定版)的安裝
sudo apt-get install google-chrome-stable
②此處安裝時用的普通用戶,root用戶無法打開。需要修改配置。
#查看瀏覽器位置
$ whereis google-chrome
#修改瀏覽器
$ sudo gedit /usr/bin/google-chrome
#將該文件中 exec -a "$0" "$HERE/chrome" "$@" 改為:
exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --no-sandbox
錯誤:5 https://repo.fdzh.org/chrome/deb stable InRelease 403 Forbidden [IP: 104.28.0.34 443]獲取:6 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB] 正在讀取軟件包列表... 完成 N: 忽略‘google-chrome.list.1’(於目錄‘/etc/apt/sources.list.d/’),鑒於它的文件擴展名無效E: 無法下載 https://repo.fdzh.org/chrome/deb/dists/stable/InRelease 403 Forbidden [IP: 104.28.0.34 443]E: 倉庫 “https://repo.fdzh.org/chrome/deb stable InRelease” 沒有數字簽名。N: 無法安全地用該源進行更新,所以默認禁用該源。N: 參見 apt-secure(8) 手冊以了解倉庫創建和用戶配置方面的細節。
