Hermes源码部署方式

安装源码
mac

sudo apt update && sudo apt install -y python3.11 python3.11-venv python3.11-dev
mac:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
进入源码目录
安装Python
创建虚拟环境
sudo apt update && sudo apt install -y python3-pip
python3 -m pip install -e . --break-system-packages -i https://mirrors.aliyun.com/pypi/simple/

python3 -m pip install -e . -i https://mirrors.aliyun.com/pypi/simple/
echo 'export PATH="\(HOME/.local/bin:\)PATH"' >> ~/.bashrc && source ~/.bashrc

解决没有命令

设置全局路径

npm config set prefix ~/.npm-global

写入 zsh 配置(Mac 默认终端)

echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

安装包

npm install -g hermes-web-ui --registry=https://registry.npmmirror.com

hermes config set model.context_length 65536 上下文问题

启动
Hermes setup 配置

飞书如果配置没有反应就是要pip缺失的插件
pip3 install lark-oapi python-multipart --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install qrcode to display a scannable QR code here next time

sudo apt update && sudo apt install -y python3-pip

python3 -m pip install -e . --break-system-packages -i https://mirrors.aliyun.com/pypi/simple/
全局装

@echo off
chcp 65001
title Hermes网关
powershell -Command "hermes gateway"
pause

bash <(curl -fsSL https://ghfast.top/https://raw.githubusercontent.com/EKKOLearnAI/hermes-web-ui/main/scripts/setup.sh)

1. 安装编译依赖(解决 node-pty 报错)

sudo apt update && sudo apt install -y make gcc g++ python3-pip

2. 配置 npm 本地目录(永久解决权限问题)

npm config set prefix ~/.npm-global
echo 'export PATH=~/.npm-global/bin:\(PATH' >> ~/.bashrc source ~/.bashrc echo 'export PATH="\)(npm config get prefix)/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

3. 安装 webui(国内极速源)

npm install -g hermes-web-ui --registry=https://registry.npmmirror.com

4. 启动!

hermes-web-ui start
或者
🛠️ 快速解决(在 root 下重新安装并配置)
请按顺序执行以下命令:

1️⃣ 检查并设置 npm 全局目录(可选,但推荐)
bash
npm config set prefix /root/.npm-global
2️⃣ 将该目录下的 bin 加入 PATH(永久生效,适用于 root 的 bash)
bash
echo 'export PATH="\(HOME/.npm-global/bin:\)PATH"' >> /root/.bashrc && source /root/.bashrc
3️⃣ 重新安装 hermes-web-ui(使用国内镜像源)
bash
npm install -g hermes-web-ui --registry=https://registry.npmmirror.com

npm install -g hermes-web-ui@0.5.14 --registry=https://registry.npmmirror.com
旧版本

4️⃣ 启动服务
bash
hermes-web-ui start
rm -rf /usr/lib/node_modules/hermes-web-ui
rm -rf /usr/lib/node_modules/.hermes-web-ui-*
npm install -g hermes-web-ui --registry=https://registry.npmmirror.com

history -c

posted @ 2026-04-09 21:12  让-雅克-卢梭  阅读(8)  评论(0)    收藏  举报