Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E: Package 'libtiff5' has no installation candidate #13

Open
baybled opened this issue Sep 26, 2023 · 0 comments
Open

E: Package 'libtiff5' has no installation candidate #13

baybled opened this issue Sep 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@baybled
Copy link

baybled commented Sep 26, 2023

tl;dr a bug involving installation of libtiff led me down a very strange path - still not working as intended

Describe the bug
ReadMe instructions followed. Error presents as package unavailable

To reproduce

  1. Install DietPi
  2. login via ssh
  3. finish DietPi initial setup
  4. Reboot
  5. Use code from the readme:

apt-get install git xorg xserver-xorg-video-fbdev python3-pip python3-rpi.gpio python3-gi libtiff5 libopenjp2-7 bluez screen rfkill -y

Expected behavior
Would expect install

Screenshots/debug logs

root@DietPi:~# apt-get install git xorg xserver-xorg-video-fbdev python3-pip python3-rpi.gpio python3-gi libtiff5 libopenjp2-7 bluez screen rfkill -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libtiff5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'libtiff5' has no installation candidate

Software/hardware configuration (please complete the following information):

  • Stenogotchi version: N/A not yet reached this step
  • Plugin version: N/A not yet reached this step
  • OS: DietPi v8.22
  • Hardware: pi0 2W

Additional context
Apt-cache shows this for other possible candidates:

root@DietPi:~# apt-cache search libtiff
gem-plugin-tiff - Graphics Environment for Multimedia - TIFF support
libgraphics-tiff-perl - Perl extension for the libtiff library
libtiff-dev - Tag Image File Format library (TIFF), development files
libtiff-doc - TIFF manipulation and conversion documentation
libtiff-opengl - TIFF manipulation and conversion tools
libtiff-tools - TIFF manipulation and conversion tools
libtiff5-dev - Tag Image File Format library (TIFF), development files (transitional package)
libtiff6 - Tag Image File Format (TIFF) library
libtiffxx6 - Tag Image File Format (TIFF) library -- C++ interface
pngtools - series of tools for PNG (Portable Network Graphics) images
pylibtiff - wrapper to the libtiff library to Python using ctypes (command line utilities)
python3-libtiff - wrapper to the libtiff library to Python using ctypes (Python 3 version)


e1:

I don't currently have the e-ink screen (which may be why libtiff5 is needed as a graphics renderer?), so I am just going to install libtiff6 and hope for the best. Will update with workaround one the screen is delivered


e2:

changed the apt command to
apt install git xorg xserver-xorg-video-fbdev python3-pip python3-rpi.gpio python3-gi libtiff6 libopenjp2-7 bluez screen rfkill python3-flask python3-flask-cors python3-evdev python3-xlib python3-pil python3-jsonpickle python3-toml -y

This adds a lot of the python packages to the apt installation, which is to comply with python 3.11 requiring packages be installed in a virtual env or to be installed in a way that may break system packages and should be used sparingly, see below. Apt is also used instead of apt-get to not have packages break due to apt breaking something during install.

and pip command to:

pip3 install file-read-backwards --break-system-packages

This is needed to override an error about the environment being externally managed (you can also use a virtual env to comply.

which misses out the problematic but necessary spidev. This is a known bug. spidev asks for gcc, and when complied with, it responds with:

creating build creating build/temp.linux-armv7l-cpython-311 arm-linux-gnueabihf-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.11 -c spidev_module.c -o build/temp.linux-armv7l-cpython-311/spidev_module.o spidev_module.c:28:10: fatal error: Python.h: No such file or directory 28 | #include <Python.h> | ^~~~~~~~~~ compilation terminated.

so:

  1. Python3.11 broke the easy installation found with pip3. Now requires --break-system-packages flag to work, so most of the python modules required have been added to the apt command.
  2. Apt command uses libtiff6 instead of libtiff5.
  3. spidev (and presumably e-ink screen) will not render as spidev has an open bug

e3:

error when installing plover pointed to python3-dev not being installed. This also fixed the spidev installation issue.

So, I think it's time just to test out this. The current commands are:

apt install bluez gcc git libtiff6 libopenjp2-7 python3-dev python3-evdev python3-flask python3-flask-cors python3-gi python3-jsonpickle python3-pil python3-pip python3-rpi.gpio python3-toml python3-xlib rfkill screen xorg xserver-xorg-video-fbdev vim -y

pip3 install file-read-backwards spidev --break-system-packages

This installs vim instead of relying on nano. Because life can be better.

time for testing phase


e4:

pycairo is not an obstacle. This is part of the plover plugin and is likely required for stenogotchi's graphics. Installing its dependencies as listed here using apt. Then this presents no obstacles. This would add 'libcairo2-dev pkg-config' to the apt command above. Should this just go inside of a requirements.txt file?


e5:

flask-wtf is needed as part of the webserver framework. This has to be installed in pip.

current commands used:

apt install bluez gcc git libcairo2-dev libtiff6 libopenjp2-7 pkg-config python3-dev python3-evdev python3-flask python3-flask-cors python3-gi python3-jsonpickle python3-pil python3-pip python3-rpi.gpio python3-toml python3-xlib rfkill screen xorg xserver-xorg-video-fbdev vim -y

and:

pip3 install flask-wtf file-read-backwards spidev --break-system-packages


e6:

needed two adjustments:

  1. edit stenogotchi/plover_plugin/stenogotchi_link/clients.py as "plover.oslayer.xkeyboardcontrol" and "uchr_to_keysym" have been renamed to "plover.oslayer.keyboardcontrol" (no x before keyboard) and "KeyboardCapture" (this is an assumption, as there are no other subclasses imported from this lib)
  2. in dietpi-config -> autostart options -> 2. This runs an x server from boot.

The problem is that, even though plover is running. I have no bluetooth connection to attach to and no flask webserver, according to htop


e7:

/root/.config/plover/plover.log shows this error:

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name com.github.stenogotchi was not provided by any .service files

Unsure how to fix. This is the error currently causing the engine to not start

@baybled baybled added the bug Something isn't working label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant