『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 2937|回复: 2

[求助] homeassistant安装homekit报错

[复制链接]

1

主题

29

帖子

119

积分

注册会员

Rank: 2

积分
119
金钱
90
HASS币
0
发表于 2019-7-29 23:43:39 | 显示全部楼层 |阅读模式
求助各位,在homeassistant添加配置项homekit后,重启homeassistant提示homekit配置有问题。以下是日志文件的内容:

2019-07-29 23:24:05 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package HAP-python==2.5.0: ERROR: Command errored out with exit status 1:
     command: /srv/homeassistant/homeassistant_venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fx452f3d/ed25519/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fx452f3d/ed25519/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-u3t3h452/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/homeassistant_venv/include/site/python3.6/ed25519
         cwd: /tmp/pip-install-fx452f3d/ed25519/
    Complete output (21 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/ed25519
    copying src/ed25519/keys.py -> build/lib.linux-x86_64-3.6/ed25519
    copying src/ed25519/__init__.py -> build/lib.linux-x86_64-3.6/ed25519
    copying src/ed25519/_version.py -> build/lib.linux-x86_64-3.6/ed25519
    copying src/ed25519/test_ed25519.py -> build/lib.linux-x86_64-3.6/ed25519
    UPDATING build/lib.linux-x86_64-3.6/ed25519/_version.py
    set build/lib.linux-x86_64-3.6/ed25519/_version.py to '1.5'
    running build_ext
    building 'ed25519._ed25519' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    creating build/temp.linux-x86_64-3.6/src/ed25519-glue
    creating build/temp.linux-x86_64-3.6/src/ed25519-supercop-ref
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Isrc/ed25519-supercop-ref -I/srv/homeassistant/homeassistant_venv/include -I/usr/include/python3.6m -c src/ed25519-glue/ed25519module.c -o build/temp.linux-x86_64-3.6/src/ed25519-glue/ed25519module.o
    unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /srv/homeassistant/homeassistant_venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fx452f3d/ed25519/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fx452f3d/ed25519/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-u3t3h452/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/homeassistant_venv/include/site/python3.6/ed25519 Check the logs for full command output.
2019-07-29 23:24:05 ERROR (MainThread) [homeassistant.requirements] Not initializing homekit because could not install requirement HAP-python==2.5.0
2019-07-29 23:24:05 ERROR (MainThread) [homeassistant.setup] Setup failed for homekit: Could not install all requirements.


回复

使用道具 举报

4

主题

159

帖子

1082

积分

论坛技术达人

积分
1082
金钱
908
HASS币
60
发表于 2019-7-30 09:52:28 | 显示全部楼层
提示缺少 x86_64-linux-gnu-gcc,用你的linux发行版包管理器安装 python-dev python3-dev
回复

使用道具 举报

1

主题

29

帖子

119

积分

注册会员

Rank: 2

积分
119
金钱
90
HASS币
0
 楼主| 发表于 2019-7-30 13:36:28 | 显示全部楼层
RobinVP 发表于 2019-7-30 09:52
提示缺少 x86_64-linux-gnu-gcc,用你的linux发行版包管理器安装 python-dev python3-dev

谢谢你的回答,找了其他资料,发现是需要安装HAP-python就可以了。由于我的是通过Python虚拟环境安装的homeassistant,所以需要在Python虚拟环境里面安装。进入Python虚拟环境后执行下面就解决了。
pip install HAP-python
pip3 install psutil
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 14:00 , Processed in 0.048531 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表