(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) 手册以了解仓库创建和用户配置方面的细节。