The libtree is a tool for displaying the shared library dependencies of an executable program or shared library via command line. This tool can be used as an alternative to the ldd command.
This tutorial shows how to install libtree on Raspberry Pi.
Connect to Raspberry Pi via SSH and download the latest executable file of libtree from GitHub:
sudo wget -qO /usr/local/bin/libtree https://github.com/haampie/libtree/releases/latest/download/libtree_armv7l
Run the following command to set execute permission:
sudo chmod a+x /usr/local/bin/libtree
libtree will be available for all users as a system-wide command.
We can check libtree version:
libtree command and give an executable program or shared library as argument:
libtree -p /usr/bin/mkdir
By default, some of standard dependencies are not shown. We can get more verbose output by specifying
libtree -v -p /usr/bin/mkdir
If you want to remove libtree, delete executable file:
sudo rm -rf /usr/local/bin/libtree