跳转到内容

Linux 安装

需求最低配置推荐配置
操作系统任意现代 Linux 发行版Ubuntu 22.04+ / Debian 12+
Python3.103.11+
内存2GB4GB+
磁盘1GB5GB+
网络必须联网宽带
Terminal window
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

这个脚本会自动完成以下操作:

  • 安装 uv 包管理器
  • 安装 Python 3.11(如果尚未安装)
  • 克隆代码仓库
  • 设置虚拟环境
  • 配置 PATH 环境变量
Terminal window
curl -fsSL https://res1.hermesagent.org.cn/install.sh | bash

:::tip 国内用户 使用国内镜像可以大幅提升下载速度,避免 GitHub 访问超时的问题。 :::

Ubuntu / Debian:

Terminal window
sudo apt update && sudo apt install -y python3 python3-pip python3-venv git curl

CentOS / RHEL:

Terminal window
sudo yum install -y python3 python3-pip git curl

Arch Linux:

Terminal window
sudo pacman -S python python-pip git curl
Terminal window
git clone https://github.com/NousResearch/hermes-agent.git ~/.hermes-agent
cd ~/.hermes-agent
Terminal window
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Terminal window
echo 'alias hermes="~/.hermes-agent/.venv/bin/python -m hermes"' >> ~/.bashrc
source ~/.bashrc
Terminal window
hermes --version
hermes doctor

:::note 关于 hermes doctor hermes doctor 命令会全面检查你的环境:Python 版本、依赖包、配置文件、网络连通性等。如果一切正常,你会看到绿色的 ✓ 标记。 :::

Terminal window
# Ubuntu 用户可通过 deadsnakes PPA 安装 Python 3.11
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.11 python3.11-venv
Terminal window
# 不要使用 sudo 运行 Hermes Agent
# 如果出现权限错误,修复目录所有权:
sudo chown -R $USER:$USER ~/.hermes

:::caution 不要使用 sudo Hermes Agent 不需要 root 权限运行。使用 sudo 会导致文件权限混乱,后续运行时会出现各种权限问题。 :::

Terminal window
# 使用国内镜像加速下载
export HERMES_MIRROR=cn
curl -fsSL https://res1.hermesagent.org.cn/install.sh | bash
Terminal window
# 手动安装 uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# 然后重新运行安装脚本
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash