Domains below for sale:kaizhiai.com , fanguzai.com , keenode.com . Please contact: dm@eejaa.com

wget安装sing-box脚本报错解决

24次阅读
没有评论

脚本GitHub地址 https://github.com/233boy/sing-box

1.一键安装脚本

bash <(wget -qO- -o- https://github.com/233boy/sing-box/raw/main/install.sh)

若出现以下提示:

-bash: wget: command not found

说明wget未安装,需先安装wget。

2.根据不同的 Linux 发行版,可以使用以下命令来安装 wget:

Ubuntu/Debian 系统:
sudo apt update sudo apt install wget

CentOS/RHEL 系统:
sudo yum install wget # CentOS 7 或 RHEL 7 及以下版本
sudo dnf install wget # CentOS 8 或 RHEL 8 及以上版本

Fedora 系统:
sudo dnf install wget

Arch Linux 系统:
sudo pacman -S wget

其他 Linux 系统: 对于其他发行版,你可以使用类似的包管理工具来安装 wget。

安装完成后,你可以通过以下命令来验证是否成功安装:
wget --version

3.CentOS安装 wget报错

安装wget时有如下报错:

Errors during downloading metadata for repository 'appstream':
Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/ ?release=8-stream&arch=x86_64&repo=AppStream&infra=genclo [Could not resolve hos t: mirrorlist.centos.org]
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.ce ntos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=genclo [Could not re solve host: mirrorlist.centos.org]

出现这个错误提示的原因是在2022年1月31日,CentOS 团队从官方镜像中移除 CentOS 8 的所有包。因为 CentOS 8 已于2021年12月31日停止官方服务了,但软件包仍在官方镜像上保留了一段时间。现在他们被转移到 https://vault.centos.org。如果你仍然需要运行 CentOS 8,你可以在 /etc/yum.repos.d 中更新一下源。使用 http://vault.centos.org 代替 http://mirror.centos.org 即可。

打开终端,输入 su 命令切换 root 用户登录,依次使用下面的命令更新源:
sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*

4.解决完以上错误后依安装wget,再执行sing-box一键安装脚本即可。

正文完
 0
饭谷仔
版权声明:本站原创文章,由 饭谷仔 于2025-07-10发表,共计1448字。
转载说明:本站文章部分原创,部分来源于互联网。转载请先获得原作者授权,并请注明出处。
评论(没有评论)
验证码