Linux 安装
| 需求 | 最低配置 | 推荐配置 |
|---|---|---|
| 操作系统 | 任意现代 Linux 发行版 | Ubuntu 22.04+ / Debian 12+ |
| Python | 3.10 | 3.11+ |
| 内存 | 2GB | 4GB+ |
| 磁盘 | 1GB | 5GB+ |
| 网络 | 必须联网 | 宽带 |
方式一:一键安装(推荐)
Section titled “方式一:一键安装(推荐)”curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash这个脚本会自动完成以下操作:
- 安装
uv包管理器 - 安装 Python 3.11(如果尚未安装)
- 克隆代码仓库
- 设置虚拟环境
- 配置 PATH 环境变量
curl -fsSL https://res1.hermesagent.org.cn/install.sh | bash:::tip 国内用户 使用国内镜像可以大幅提升下载速度,避免 GitHub 访问超时的问题。 :::
方式二:手动安装
Section titled “方式二:手动安装”第 1 步:安装系统依赖
Section titled “第 1 步:安装系统依赖”Ubuntu / Debian:
sudo apt update && sudo apt install -y python3 python3-pip python3-venv git curlCentOS / RHEL:
sudo yum install -y python3 python3-pip git curlArch Linux:
sudo pacman -S python python-pip git curl第 2 步:克隆代码仓库
Section titled “第 2 步:克隆代码仓库”git clone https://github.com/NousResearch/hermes-agent.git ~/.hermes-agentcd ~/.hermes-agent第 3 步:创建虚拟环境
Section titled “第 3 步:创建虚拟环境”python3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txt第 4 步:添加到 PATH
Section titled “第 4 步:添加到 PATH”echo 'alias hermes="~/.hermes-agent/.venv/bin/python -m hermes"' >> ~/.bashrcsource ~/.bashrchermes --versionhermes doctor:::note 关于 hermes doctor
hermes doctor 命令会全面检查你的环境:Python 版本、依赖包、配置文件、网络连通性等。如果一切正常,你会看到绿色的 ✓ 标记。
:::
常见问题排查
Section titled “常见问题排查”Python 版本过低
Section titled “Python 版本过低”# Ubuntu 用户可通过 deadsnakes PPA 安装 Python 3.11sudo add-apt-repository ppa:deadsnakes/ppasudo apt install python3.11 python3.11-venv# 不要使用 sudo 运行 Hermes Agent# 如果出现权限错误,修复目录所有权:sudo chown -R $USER:$USER ~/.hermes:::caution 不要使用 sudo Hermes Agent 不需要 root 权限运行。使用 sudo 会导致文件权限混乱,后续运行时会出现各种权限问题。 :::
# 使用国内镜像加速下载export HERMES_MIRROR=cncurl -fsSL https://res1.hermesagent.org.cn/install.sh | bashuv 安装失败
Section titled “uv 安装失败”# 手动安装 uvcurl -LsSf https://astral.sh/uv/install.sh | sh# 然后重新运行安装脚本curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash