gpt4 book ai didi

linux - 在 Raspberry pi 3 (Ubuntu MATE 16.04) 上安装后出现 WebIOPi 错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:23:57 27 4
gpt4 key购买 nike

我从网上下载了 WebIOPi-0.6.0.tar.gz 并解压并运行了 setup.sh。安装后,当我运行 sudo webiopi 时它会显示这个..

ralph@ralph-desktop:~$ sudo webiopi
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.5/runpy.py", line 133, in _get_module_details return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details __import__(pkg_name)
File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.6.0-py3.5-linux-armv7l.egg/webiopi/__init__.py", line 17, in <module>
import _webiopi.GPIO as GPIO
_webiopi.GPIO.SetupException: This module can only be run on a Raspberry Pi!

好像哪里不对?我尝试重新安装它,但问题仍然存在。

已编辑

我通过@Codino 运行代码并得到了这个结果。

ralph@ralph-desktop:~/WebIOPi-0.7.1$ sudo webiopi
2016-07-21 03:11:12 - WebIOPi - INFO - Starting WebIOPi/0.7.22/Python3.5
2016-07-21 03:11:12 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2016-07-21 03:11:12 - WebIOPi - INFO - DigitalActuator - LightSwitch mapped to REST API /devices/IJFottwtJsEzH8wF
2016-07-21 03:11:12 - WebIOPi - WARNING - Access unprotected
2016-07-21 03:11:12 - WebIOPi - ERROR - [Errno 98] Address already in use
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.7.22-py3.5-linux-armv7l.egg/webiopi/protocols/http.py", line 45, in __init__
BaseHTTPServer.HTTPServer.__init__(self, ("", port), HTTPHandler)
File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
self.server_bind()
File "/usr/lib/python3.5/http/server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/lib/python3.5/socketserver.py", line 454, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.7.22-py3.5-linux-armv7l.egg/webiopi/__main__.py", line 77, in <module>
main(sys.argv)
File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.7.22-py3.5-linux-armv7l.egg/webiopi/__main__.py", line 70, in main
server = Server(port=port, configfile=configfile, scriptfile=scriptfile)
File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.7.22-py3.5-linux-armv7l.egg/webiopi/server/__init__.py", line 120, in __init__
self.http_server = http.HTTPServer(self.host, http_port, self.restHandler, context, docroot, index, auth, realm)
File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.7.22-py3.5-linux-armv7l.egg/webiopi/protocols/http.py", line 48, in __init__
BaseHTTPServer.HTTPServer.__init__(self, ("", port), HTTPHandler)
File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
self.server_bind()
File "/usr/lib/python3.5/http/server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/lib/python3.5/socketserver.py", line 454, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use

最佳答案

因为您使用的版本不兼容。尝试 this .

$ wget http://sourceforge.net/projects/webiopi/files/WebIOPi-0.7.1.tar.gz
$ tar xvzf WebIOPi-0.7.1.tar.gz
$ cd WebIOPi-0.7.1
$ wget https://raw.githubusercontent.com/doublebind/raspi/master/webiopi-pi2bplus.patch
$ patch -p1 -i webiopi-pi2bplus.patch
$ sudo ./setup.sh

关于linux - 在 Raspberry pi 3 (Ubuntu MATE 16.04) 上安装后出现 WebIOPi 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38467756/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com