在升级至Home Assistant Core 2024.10版本后启动失败,使用journalctl -xe
查看显示错误No such file or directory: 'uv'
:
ERROR (MainThread) [homeassistant.bootstrap] Error setting up integration frontend - received exception
Traceback (most recent call last):
……
FileNotFoundError: [Errno 2] No such file or directory: 'uv'
经检查,uv已正常安装。
为解决此问题,需要修改systemd中homeassistant的配置,加入“Environment”项:
[Unit]
Description=Home Assistant
After=network-online.target
[Service]
Type=simple
User=%i
WorkingDirectory=/home/%i/.homeassistant
ExecStart=/srv/homeassistant/bin/hass -c "/home/%i/.homeassistant"
# 加入此行↓
Environment="PATH=/srv/homeassistant/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/homeassistant/.local/bin"
RestartForceExitStatus=100
Restart=on-failure
[Install]
WantedBy=multi-user.target
重新启动Home Assistant服务,成功升级至2024.10.2。
参考资料
- 2024.10.0 HA core doesn’t find uv · Issue #127359 · home-assistant/core · GitHub
- Linux升级Home Assistant Core版本的方法 – 锟斤拷的博客
心情表态
+1
+1
+1
+1
+1
+1
近期评论