Q: Web UI 启动失败 — spawn hermes ENOENT 怎么解决? #4
Answered
by
normdist-ai
normdist-ai
asked this question in
Q&A
ProblemHermes Web UI 的 systemd service 启动失败,日志报 Context
What I Tried
Error/IssueWhat I Needsystemd service 找不到 hermes 二进制,但手动运行 |
Answered by
normdist-ai
Jul 15, 2026
Replies: 1 comment
Solutionsystemd user service 的 PATH 环境变量不包含 修复步骤# 1. 编辑 service 文件,添加 PATH 环境变量
systemctl --user edit hermes-web-ui.service
# 在打开的编辑器中添加:
[Service]
Environment=PATH=/home/tony/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# 2. 重载 systemd 并重启
systemctl --user daemon-reload
systemctl --user restart hermes-web-ui
# 3. 验证状态
systemctl --user status hermes-web-ui为什么这样解决systemd 的 user service 默认 PATH 很精简( 验证# 确认 service 运行正常
systemctl --user is-active hermes-web-ui
# 应输出:active
# 查看日志确认无 ENOENT 错误
journalctl --user -u hermes-web-ui --no-pager -n 20参考
|
0 replies
Answer selected by
normdist-ai
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solution
systemd user service 的 PATH 环境变量不包含
~/.local/bin,导致找不到 hermes 二进制。修复步骤
为什么这样解决
systemd 的 user service 默认 PATH 很精简(
/usr/bin:/bin),不会读取 shell 的 profile/rc 文件。而hermes二进制安装在~/.local/bin/,不在默认 PATH 中。所以从终端手动运行正常,但通过 systemd 启动就报 ENOENT。验证