tools icon indicating copy to clipboard operation
tools copied to clipboard

Error: [package 'libjpeg8-dev' has no installation candidate] due to libjpeg62-turbo-dev. Compile fails

Open 2play opened this issue 2 years ago • 4 comments

Cant compile screesnshot due to Pi4, Bullseye Debian

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libjpeg8-dev 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
However the following packages replace it:
  libjpeg62-turbo-dev:armhf libjpeg62-turbo-dev

E: Package 'libjpeg8-dev' has no installation candidate```

2play avatar Apr 30 '22 20:04 2play

/tools/screenshot $ make
cc -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -std=gnu99 -fgnu89-inline  -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -O3 -Wno-psabi -s -L/opt/vc/lib/ -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -ljpeg screenshot.c -o screenshot
/usr/bin/ld: /tmp/ccvuECtP.o: in function `main':
screenshot.c:(.text.startup+0x34): undefined reference to `bcm_host_init'
/usr/bin/ld: screenshot.c:(.text.startup+0x3c): undefined reference to `vc_dispmanx_display_open'
/usr/bin/ld: screenshot.c:(.text.startup+0x48): undefined reference to `vc_dispmanx_display_get_info'
/usr/bin/ld: screenshot.c:(.text.startup+0x64): undefined reference to `vc_dispmanx_resource_create'
/usr/bin/ld: screenshot.c:(.text.startup+0x78): undefined reference to `vc_dispmanx_snapshot'
/usr/bin/ld: screenshot.c:(.text.startup+0x94): undefined reference to `vc_dispmanx_rect_set'
/usr/bin/ld: screenshot.c:(.text.startup+0xc4): undefined reference to `vc_dispmanx_resource_read_data'
/usr/bin/ld: screenshot.c:(.text.startup+0xcc): undefined reference to `vc_dispmanx_resource_delete'
/usr/bin/ld: screenshot.c:(.text.startup+0xd8): undefined reference to `vc_dispmanx_display_close'
/usr/bin/ld: screenshot.c:(.text.startup+0xe8): undefined reference to `jpeg_std_error'
/usr/bin/ld: screenshot.c:(.text.startup+0x104): undefined reference to `jpeg_CreateCompress'
/usr/bin/ld: screenshot.c:(.text.startup+0x118): undefined reference to `jpeg_stdio_dest'
/usr/bin/ld: screenshot.c:(.text.startup+0x134): undefined reference to `jpeg_set_defaults'
/usr/bin/ld: screenshot.c:(.text.startup+0x144): undefined reference to `jpeg_set_quality'
/usr/bin/ld: screenshot.c:(.text.startup+0x150): undefined reference to `jpeg_start_compress'
/usr/bin/ld: screenshot.c:(.text.startup+0x45c): undefined reference to `jpeg_write_scanlines'
/usr/bin/ld: screenshot.c:(.text.startup+0x480): undefined reference to `jpeg_finish_compress'
/usr/bin/ld: screenshot.c:(.text.startup+0x488): undefined reference to `jpeg_destroy_compress'
collect2: error: ld returned 1 exit status
make: *** [Makefile:8: screenshot] Error 1

2play avatar Apr 30 '22 20:04 2play

You need both a JPEG library as well as the RPI development libraries available. It seems bullseye has newer versions. I don't have a Bullseye available at the moment, but I think libjpeg9-dev might work as the JPEG library dev package. Not sure if the VideoCore (VC) development library is still available on bullseye. At least if you run with dtoverlay=vc4-kms-v3d in /boot/config.txt, this method of taking screenshots won't work anyway, even if you get it to compile.

What do you intend to use the tool for? Taking screenshot of your desktop? If so, using something shutter might work better.

dividuum avatar May 04 '22 13:05 dividuum

Screenshot tool is best for making screenshots over ssh for all cases, x, console, or within ES for my themes or gaming shots :-)

2play avatar May 04 '22 14:05 2play

As I don't have any Bullseye installation at the moment, I cannot easily fix this right now. Pull requests welcome.

dividuum avatar May 04 '22 14:05 dividuum