Closed jeylites closed 6 years ago
Hi NightRanger,
I'm trying to install Broadlink-http-rest to test the TC2 codes but I'm getting the following error. Any idea what that is?
`pi@raspberrypi:~ $ sudo apt-get install python-dev Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libc-ares2 libv8-3.14.5 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libpython-dev libpython2.7-dev python2.7-dev The following NEW packages will be installed: libpython-dev libpython2.7-dev python-dev python2.7-dev 0 upgraded, 4 newly installed, 0 to remove and 7 not upgraded. Need to get 18.2 MB of archives. After this operation, 25.7 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpython2.7-dev armhf 2.7.9-2+deb8u1 [17.9 MB] Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main python-dev armhf 2.7.9-1 [1,188 B] Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpython-dev armhf 2.7.9-1 [19.6 kB] Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main python2.7-dev armhf 2.7.9-2+deb8u1 [287 kB] Fetched 18.2 MB in 25s (718 kB/s) Selecting previously unselected package libpython2.7-dev:armhf. (Reading database ... 117302 files and directories currently installed.) Preparing to unpack .../libpython2.7-dev_2.7.9-2+deb8u1_armhf.deb ... Unpacking libpython2.7-dev:armhf (2.7.9-2+deb8u1) ... Selecting previously unselected package libpython-dev:armhf. Preparing to unpack .../libpython-dev_2.7.9-1_armhf.deb ... Unpacking libpython-dev:armhf (2.7.9-1) ... Selecting previously unselected package python2.7-dev. Preparing to unpack .../python2.7-dev_2.7.9-2+deb8u1_armhf.deb ... Unpacking python2.7-dev (2.7.9-2+deb8u1) ... Selecting previously unselected package python-dev. Preparing to unpack .../python-dev_2.7.9-1_armhf.deb ... Unpacking python-dev (2.7.9-1) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up libpython2.7-dev:armhf (2.7.9-2+deb8u1) ... Setting up libpython-dev:armhf (2.7.9-1) ... Setting up python2.7-dev (2.7.9-2+deb8u1) ... Setting up python-dev (2.7.9-1) ... pi@raspberrypi:~ $ cd /tmp/ pi@raspberrypi:/tmp $ git clone https://github.com/mjg59/python-broadlink Cloning into 'python-broadlink'... remote: Counting objects: 142, done. remote: Total 142 (delta 0), reused 0 (delta 0), pack-reused 142 Receiving objects: 100% (142/142), 27.87 KiB | 0 bytes/s, done. Resolving deltas: 100% (62/62), done. Checking connectivity... done. pi@raspberrypi:/tmp $ cd python-broadlink pi@raspberrypi:/tmp/python-broadlink $ sudo python setup.py install running install running bdist_egg running egg_info creating broadlink.egg-info writing requirements to broadlink.egg-info/requires.txt writing broadlink.egg-info/PKG-INFO writing top-level names to broadlink.egg-info/top_level.txt writing dependency_links to broadlink.egg-info/dependency_links.txt writing manifest file 'broadlink.egg-info/SOURCES.txt' reading manifest file 'broadlink.egg-info/SOURCES.txt' writing manifest file 'broadlink.egg-info/SOURCES.txt' installing library code to build/bdist.linux-armv7l/egg running install_lib running build_py creating build creating build/lib.linux-armv7l-2.7 creating build/lib.linux-armv7l-2.7/broadlink copying broadlink/init.py -> build/lib.linux-armv7l-2.7/broadlink creating build/bdist.linux-armv7l creating build/bdist.linux-armv7l/egg creating build/bdist.linux-armv7l/egg/broadlink copying build/lib.linux-armv7l-2.7/broadlink/init.py -> build/bdist.linux-armv7l/egg/broadlink byte-compiling build/bdist.linux-armv7l/egg/broadlink/init.py to init.pyc creating build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/not-zip-safe -> build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO creating dist creating 'dist/broadlink-0.3-py2.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it removing 'build/bdist.linux-armv7l/egg' (and everything under it) Processing broadlink-0.3-py2.7.egg creating /usr/local/lib/python2.7/dist-packages/broadlink-0.3-py2.7.egg Extracting broadlink-0.3-py2.7.egg to /usr/local/lib/python2.7/dist-packages Adding broadlink 0.3 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/broadlink-0.3-py2.7.egg Processing dependencies for broadlink==0.3 Searching for pycrypto==2.6.1 Reading https://pypi.python.org/simple/pycrypto/ Best match: pycrypto 2.6.1 Downloading https://pypi.python.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz#md5=55a61a054aa66812daf5161a0d5d7eda Processing pycrypto-2.6.1.tar.gz Writing /tmp/easy_install-2Mrn07/pycrypto-2.6.1/setup.cfg Running pycrypto-2.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-2Mrn07/pycrypto-2.6.1/egg-dist-tmp-V1nvyE warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath. zip_safe flag not set; analyzing archive contents... Adding pycrypto 2.6.1 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/pycrypto-2.6.1-py2.7-linux-armv7l.egg Finished processing dependencies for broadlink==0.3 pi@raspberrypi:/tmp/python-broadlink $ cd /home/pi pi@raspberrypi:~ $ git clone https://github.com/NightRang3r/broadlink-http-rest Cloning into 'broadlink-http-rest'... remote: Counting objects: 56, done. remote: Total 56 (delta 0), reused 0 (delta 0), pack-reused 56 Unpacking objects: 100% (56/56), done. Checking connectivity... done. pi@raspberrypi:~ $ sudo pip install netaddr Downloading/unpacking netaddr Downloading netaddr-0.7.19-py2.py3-none-any.whl (1.6MB): 1.6MB downloaded Installing collected packages: netaddr Successfully installed netaddr Cleaning up... pi@raspberrypi:~ $ sudo pip install configparser Downloading/unpacking configparser Downloading configparser-3.5.0.tar.gz Running setup.py (path:/tmp/pip-build-Az4Tuw/configparser/setup.py) egg_info for package configparser
Installing collected packages: configparser Running setup.py install for configparser
Skipping installation of /usr/local/lib/python2.7/dist-packages/backports/__init__.py (namespace package) Installing /usr/local/lib/python2.7/dist-packages/configparser-3.5.0-nspkg.pth
Successfully installed configparser Cleaning up... pi@raspberrypi:~ $ nano broadlink-http-rest.service pi@raspberrypi:~ $ sudo mv broadlink-http-rest.service /etc/systemd/system pi@raspberrypi:~ $ sudo systemctl daemon-reload pi@raspberrypi:~ $ sudo systemctl enable broadlink-http-rest.service Created symlink from /etc/systemd/system/multi-user.target.wants/broadlink-http-rest.service to /etc/systemd/system/broadlink-http-rest.service. pi@raspberrypi:~ $ sudo systemctl start broadlink-http-rest.service pi@raspberrypi:~ $ sudo systemctl status broadlink-http-rest.service ● broadlink-http-rest.service - broadlink-http-rest Loaded: loaded (/etc/systemd/system/broadlink-http-rest.service; enabled) Active: failed (Result: exit-code) since Wed 2017-04-05 11:20:21 UTC; 4s ago Process: 2946 ExecStart=/usr/bin/python /home/pi/broadlink-http-rest/server.py (code=exited, status=1/FAILURE) Main PID: 2946 (code=exited, status=1/FAILURE)
Apr 05 11:20:21 raspberrypi python[2946]: self.server_bind() Apr 05 11:20:21 raspberrypi python[2946]: File "/usr/lib/python2.7/BaseHTTPS...d Apr 05 11:20:21 raspberrypi python[2946]: SocketServer.TCPServer.server_bind...) Apr 05 11:20:21 raspberrypi python[2946]: File "/usr/lib/python2.7/SocketSer...d Apr 05 11:20:21 raspberrypi python[2946]: self.socket.bind(self.server_address) Apr 05 11:20:21 raspberrypi python[2946]: File "/usr/lib/python2.7/socket.py...h Apr 05 11:20:21 raspberrypi python[2946]: return getattr(self._sock,name)(*args) Apr 05 11:20:21 raspberrypi python[2946]: socket.error: [Errno 98] Address a...e Apr 05 11:20:21 raspberrypi systemd[1]: broadlink-http-rest.service: main pr...E Apr 05 11:20:21 raspberrypi systemd[1]: Unit broadlink-http-rest.service ent.... Hint: Some lines were ellipsized, use -l to show in full. pi@raspberrypi:~ $ `
can't understand this mess, please format the code, have you used sudo to run it ?
Hi NightRanger,
I'm trying to install Broadlink-http-rest to test the TC2 codes but I'm getting the following error. Any idea what that is?
`pi@raspberrypi:~ $ sudo apt-get install python-dev Reading package lists... Done Building dependency tree
Reading state information... Done The following packages were automatically installed and are no longer required: libc-ares2 libv8-3.14.5 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libpython-dev libpython2.7-dev python2.7-dev The following NEW packages will be installed: libpython-dev libpython2.7-dev python-dev python2.7-dev 0 upgraded, 4 newly installed, 0 to remove and 7 not upgraded. Need to get 18.2 MB of archives. After this operation, 25.7 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpython2.7-dev armhf 2.7.9-2+deb8u1 [17.9 MB] Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main python-dev armhf 2.7.9-1 [1,188 B] Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpython-dev armhf 2.7.9-1 [19.6 kB] Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main python2.7-dev armhf 2.7.9-2+deb8u1 [287 kB] Fetched 18.2 MB in 25s (718 kB/s)
Selecting previously unselected package libpython2.7-dev:armhf. (Reading database ... 117302 files and directories currently installed.) Preparing to unpack .../libpython2.7-dev_2.7.9-2+deb8u1_armhf.deb ... Unpacking libpython2.7-dev:armhf (2.7.9-2+deb8u1) ... Selecting previously unselected package libpython-dev:armhf. Preparing to unpack .../libpython-dev_2.7.9-1_armhf.deb ... Unpacking libpython-dev:armhf (2.7.9-1) ... Selecting previously unselected package python2.7-dev. Preparing to unpack .../python2.7-dev_2.7.9-2+deb8u1_armhf.deb ... Unpacking python2.7-dev (2.7.9-2+deb8u1) ... Selecting previously unselected package python-dev. Preparing to unpack .../python-dev_2.7.9-1_armhf.deb ... Unpacking python-dev (2.7.9-1) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up libpython2.7-dev:armhf (2.7.9-2+deb8u1) ... Setting up libpython-dev:armhf (2.7.9-1) ... Setting up python2.7-dev (2.7.9-2+deb8u1) ... Setting up python-dev (2.7.9-1) ... pi@raspberrypi:~ $ cd /tmp/ pi@raspberrypi:/tmp $ git clone https://github.com/mjg59/python-broadlink Cloning into 'python-broadlink'... remote: Counting objects: 142, done. remote: Total 142 (delta 0), reused 0 (delta 0), pack-reused 142 Receiving objects: 100% (142/142), 27.87 KiB | 0 bytes/s, done. Resolving deltas: 100% (62/62), done. Checking connectivity... done. pi@raspberrypi:/tmp $ cd python-broadlink pi@raspberrypi:/tmp/python-broadlink $ sudo python setup.py install running install running bdist_egg running egg_info creating broadlink.egg-info writing requirements to broadlink.egg-info/requires.txt writing broadlink.egg-info/PKG-INFO writing top-level names to broadlink.egg-info/top_level.txt writing dependency_links to broadlink.egg-info/dependency_links.txt writing manifest file 'broadlink.egg-info/SOURCES.txt' reading manifest file 'broadlink.egg-info/SOURCES.txt' writing manifest file 'broadlink.egg-info/SOURCES.txt' installing library code to build/bdist.linux-armv7l/egg running install_lib running build_py creating build creating build/lib.linux-armv7l-2.7 creating build/lib.linux-armv7l-2.7/broadlink copying broadlink/init.py -> build/lib.linux-armv7l-2.7/broadlink creating build/bdist.linux-armv7l creating build/bdist.linux-armv7l/egg creating build/bdist.linux-armv7l/egg/broadlink copying build/lib.linux-armv7l-2.7/broadlink/init.py -> build/bdist.linux-armv7l/egg/broadlink byte-compiling build/bdist.linux-armv7l/egg/broadlink/init.py to init.pyc creating build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/not-zip-safe -> build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying broadlink.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO creating dist creating 'dist/broadlink-0.3-py2.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it removing 'build/bdist.linux-armv7l/egg' (and everything under it) Processing broadlink-0.3-py2.7.egg creating /usr/local/lib/python2.7/dist-packages/broadlink-0.3-py2.7.egg Extracting broadlink-0.3-py2.7.egg to /usr/local/lib/python2.7/dist-packages Adding broadlink 0.3 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/broadlink-0.3-py2.7.egg Processing dependencies for broadlink==0.3 Searching for pycrypto==2.6.1 Reading https://pypi.python.org/simple/pycrypto/ Best match: pycrypto 2.6.1 Downloading https://pypi.python.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz#md5=55a61a054aa66812daf5161a0d5d7eda Processing pycrypto-2.6.1.tar.gz Writing /tmp/easy_install-2Mrn07/pycrypto-2.6.1/setup.cfg Running pycrypto-2.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-2Mrn07/pycrypto-2.6.1/egg-dist-tmp-V1nvyE warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath. zip_safe flag not set; analyzing archive contents... Adding pycrypto 2.6.1 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/pycrypto-2.6.1-py2.7-linux-armv7l.egg Finished processing dependencies for broadlink==0.3 pi@raspberrypi:/tmp/python-broadlink $ cd /home/pi pi@raspberrypi:~ $ git clone https://github.com/NightRang3r/broadlink-http-rest Cloning into 'broadlink-http-rest'... remote: Counting objects: 56, done. remote: Total 56 (delta 0), reused 0 (delta 0), pack-reused 56 Unpacking objects: 100% (56/56), done. Checking connectivity... done. pi@raspberrypi:~ $ sudo pip install netaddr Downloading/unpacking netaddr Downloading netaddr-0.7.19-py2.py3-none-any.whl (1.6MB): 1.6MB downloaded Installing collected packages: netaddr Successfully installed netaddr Cleaning up... pi@raspberrypi:~ $ sudo pip install configparser Downloading/unpacking configparser Downloading configparser-3.5.0.tar.gz Running setup.py (path:/tmp/pip-build-Az4Tuw/configparser/setup.py) egg_info for package configparser
Installing collected packages: configparser Running setup.py install for configparser
Successfully installed configparser Cleaning up... pi@raspberrypi:~ $ nano broadlink-http-rest.service pi@raspberrypi:~ $ sudo mv broadlink-http-rest.service /etc/systemd/system pi@raspberrypi:~ $ sudo systemctl daemon-reload pi@raspberrypi:~ $ sudo systemctl enable broadlink-http-rest.service Created symlink from /etc/systemd/system/multi-user.target.wants/broadlink-http-rest.service to /etc/systemd/system/broadlink-http-rest.service. pi@raspberrypi:~ $ sudo systemctl start broadlink-http-rest.service pi@raspberrypi:~ $ sudo systemctl status broadlink-http-rest.service ● broadlink-http-rest.service - broadlink-http-rest Loaded: loaded (/etc/systemd/system/broadlink-http-rest.service; enabled) Active: failed (Result: exit-code) since Wed 2017-04-05 11:20:21 UTC; 4s ago Process: 2946 ExecStart=/usr/bin/python /home/pi/broadlink-http-rest/server.py (code=exited, status=1/FAILURE) Main PID: 2946 (code=exited, status=1/FAILURE)
Apr 05 11:20:21 raspberrypi python[2946]: self.server_bind() Apr 05 11:20:21 raspberrypi python[2946]: File "/usr/lib/python2.7/BaseHTTPS...d Apr 05 11:20:21 raspberrypi python[2946]: SocketServer.TCPServer.server_bind...) Apr 05 11:20:21 raspberrypi python[2946]: File "/usr/lib/python2.7/SocketSer...d Apr 05 11:20:21 raspberrypi python[2946]: self.socket.bind(self.server_address) Apr 05 11:20:21 raspberrypi python[2946]: File "/usr/lib/python2.7/socket.py...h Apr 05 11:20:21 raspberrypi python[2946]: return getattr(self._sock,name)(*args) Apr 05 11:20:21 raspberrypi python[2946]: socket.error: [Errno 98] Address a...e Apr 05 11:20:21 raspberrypi systemd[1]: broadlink-http-rest.service: main pr...E Apr 05 11:20:21 raspberrypi systemd[1]: Unit broadlink-http-rest.service ent.... Hint: Some lines were ellipsized, use -l to show in full. pi@raspberrypi:~ $ `