ballle98 / cec-mqtt-bridge

A HDMI-CEC to MQTT bridge for connecting HDMI-CEC-devices to your Home Automation system.
2 stars 1 forks source link

How to install on Raspberry Pi OS Bookworm 64-bit #11

Closed BenJamesAndo closed 1 month ago

BenJamesAndo commented 4 months ago

Hello, thanks for reviving this project. I'm keen to get it running. I've got a Raspberry Pi 4 running Raspberry Pi Bookworm 64-bit. Perhaps this is why I can't get it to work. When I run ./contrib/debian-ubuntu-install.sh I get an error about externally-managed-environment. If I try to manually install python-lirc with sudo pip3 install python-lirc --break-system-packages I get

Building wheels for collected packages: python-lirc
  Building wheel for python-lirc (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  ? exit code: 1
  ??> [5 lines of output]
      lirc/lirc.c:49:12: fatal error: longintrepr.h: No such file or directory
         49 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-lirc
  Running setup.py clean for python-lirc
Failed to build python-lirc
Installing collected packages: python-lirc
  Running setup.py install for python-lirc ... error
  error: subprocess-exited-with-error

  × Running setup.py install for python-lirc did not run successfully.
  ? exit code: 1
  ??> [7 lines of output]
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      lirc/lirc.c:49:12: fatal error: longintrepr.h: No such file or directory
         49 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
??> python-lirc

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Is there something different I need to do to get this working?

ballle98 commented 3 months ago

@BenJamesAndo I have not updated my pi to bookworm yet. Maybe in a month or 2 I'll do that. Honestly I have not been using the lirc part and I noticed when I started on the project python-lirc was dead (see #2). If you are not using lirc functions then try removing requirements.txt

ballle98 commented 1 month ago

@BenJamesAndo I believe this should be fixed now. I updated the readme.md install instructions. The correct lirc python module should be installed as part of "apt get install lirc" if there are issues you many need to "pip uninstall lirc" and "apt-get install --reinstall lirc". Unfortunately neither lirc or cec are available on pypi.

ballle98 commented 1 month ago

may also require "sudo pip install /usr/share/lirc/lirc-*.tar.gz" see #18