Install libtree on Raspberry Pi

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.

Install libtree

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

Now libtree will be available for all users as a system-wide command.

We can check libtree version:

libtree --version

Testing libtree

Execute the 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 -v option.

libtree -v -p /usr/bin/mkdir
Display shared library dependencies using libtree on Raspberry Pi

Uninstall libtree

If you want to remove libtree, delete executable file:

sudo rm -rf /usr/local/bin/libtree

Leave a Comment

Your email address will not be published.