我试图在github上使用this repositorie在CentOS7计算机上加载测试我的MQTT网络。我执行了以下命令来安装python-mosquitto依赖。
# yum install python-pip
# pip install mosquitto
然后我构建并安装了位于存储库文件中的setup.py文件:
# python setup.py build
# python setup.py install
尝试使用该软件包时,会抛出错误:
# malaria publish -P 2 -n 100 -H localhost -s 10
错误:
# malaria publish -P 2 -n 100 -H localhost -s 10malaria publish -P 2 -n 100 -H localhost -s 10
Traceback (most recent call last):
File "/usr/bin/malaria", line 5, in <module>
pkg_resources.run_script('mqtt-malaria==0.1-77-g7ae4c97', 'malaria')
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1455, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/lib/python2.7/site-packages/mqtt_malaria-0.1_77_g7ae4c97-py2.7.egg/EGG-INFO/scripts/malaria", line 30, in <module>
import beem.main
File "/usr/lib/python2.7/site-packages/mqtt_malaria-0.1_77_g7ae4c97-py2.7.egg/beem/main.py", line 34, in <module>
import beem.cmds
File "/usr/lib/python2.7/site-packages/mqtt_malaria-0.1_77_g7ae4c97-py2.7.egg/beem/cmds/__init__.py", line 2, in <module>
import beem.cmds.subscribe
File "/usr/lib/python2.7/site-packages/mqtt_malaria-0.1_77_g7ae4c97-py2.7.egg/beem/cmds/subscribe.py", line 34, in <module>
import beem.listen
File "/usr/lib/python2.7/site-packages/mqtt_malaria-0.1_77_g7ae4c97-py2.7.egg/beem/listen.py", line 40, in <module>
import fuse
File "build/bdist.linux-x86_64/egg/fuse.py", line 69, in <module>
EnvironmentError: Unable to find libfuse
谷歌搜索错误并没有给我任何答案。我在安装过程中做错了什么?我对克隆的Github存储库的使用/构建没有多少经验。
答案 0 :(得分:1)
如果运行CentOS,你可能想要“yum install fuse-python”,它会将fuse-libs作为依赖项安装。这样做之后,它对我有用。
答案 1 :(得分:0)
存储库上的问题页面(您链接到的问题之前的问题)提到了这个问题。
正如您所发现的那样,解决方案是从软件包管理器或pip install fusepy
单独安装fusepy。