Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 2459

Raspberry Pi OS • Re: Identify missing libraries and packages

$
0
0
I've successfully compiled a qt6 program (which was somewhat of a marathon in itself, getting all the right pieces in place) and want to run it on a "clean" Pi Bookworm setup. This requires installation of some extra libraries, although nowhere near as many as I have on the development machine.

I've found "ldd" (and a few other methods) to determine the complete list of libraries which my program uses; however rather than manually going everything:
a) Is there a method to determine which of the required libraries are not currently installed on the target machine?
ldd is your friend, as you've found. Mostly, though, just look at the libfoo-dev packages you had to install to compile the thing, and remove the '-dev' bit as a decent start.
b) Is there a way to backtrack a library to determine which package it comes from?
In general

Code:

dpkg -S /path/to/foo
will give you the name of the package the file came from. So ldd will list the libraries linked, and dpkg -S /lib/....so will give you the package name.

Also, initramfs-tools has a very interesting script to copy a binary and its library dependencies into the initramfs, without the need to manually specify anything. You might want to look at what that does, especially if you've built libraries as part of the package you've built that aren't installed by the system.

Statistics: Posted by dickon — Sun Oct 27, 2024 9:50 am



Viewing all articles
Browse latest Browse all 2459

Trending Articles