windows系统安装hermes实操步骤一~hermes初安装

【主体思路】安装wsl-->ubuntu-->hermes,踩过较多的坑在于,直接用官方安装命令时,部分组件安装不上,签名验证失败,github连接不上等各种问题。

【通关步骤】反反复复卸了装,装了卸,最后实测通关步骤整理如下:

1、在 PowerShell 中输入:wsl --install

2、安装指定版本的ubuntu,继续执行:wsl -d Ubuntu-24.04;(清华大学 TUNA 源对 Ubuntu 24.04 (Noble) 非常稳定)

3、 修复网络( 测试 DNS 解析和网络连通性:ping -c 3 8.8.8.8 有丢包或者不通时执行该步骤,可整体复制粘贴过去执行)

# 1. 禁止 WSL 自动生成 resolv.conf
sudo tee /etc/wsl.conf <<EOF
[network]
generateResolvConf = false
EOF

# 2. 删除旧的 resolv.conf
sudo rm -f /etc/resolv.conf

# 3. 写入公共 DNS
sudo tee /etc/resolv.conf <<EOF
nameserver 8.8.8.8
nameserver 114.114.114.114
EOF

# 4. 退出 Ubuntu 并重启 WSL
exit

4、重新打开powershell,以下从sudo开始都在ubuntu中执行。

#进入指定版本ubuntu
wsl -d Ubuntu-24.04

# 备份原来的源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

# 替换为清华源(适用于 Ubuntu 24.04 Noble)
sudo tee /etc/apt/sources.list <<EOF
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-security main restricted universe multiverse
EOF
# 更新软件源(最折腾的步骤,官方命令组件装不上,还会遇到各种NODATA、sign失败、连接不上等报错)
sudo apt update
# 继续安装必要组件(以下为正常官方命令装不上的一些组件)

sudo apt install -y python3-venv python3-pip ripgrep ffmpeg

# 重新运行 Hermes 安装脚本

curl -fsSL https://res1.hermesagent.org.cn/install.sh | bash

# 安装完成后,刷新环境变量并验证

source ~/.bashrc
hermes --version

 

posted @ 2026-05-18 21:22  青域  阅读(166)  评论(0)    收藏  举报