Install libtree on Ubuntu 20.04

Install libtree on Ubuntu 20.04

The libtree is a command line tool that displays the shared library dependencies of an executable program or shared library. This tool can be used as an alternative to the ldd command.

This tutorial explains how to install libtree on Ubuntu 20.04.

Install libtree

Download libtree executable file from the releases page in GitHub repository:

sudo wget -qO /usr/local/bin/libtree https://github.com/haampie/libtree/releases/latest/download/libtree_x86_64

Next, set execute permission:

sudo chmod a+x /usr/local/bin/libtree

Now libtree can be used for all users as a system-wide command.

We can check libtree version as follows:

libtree --version

Testing libtree

Run the libtree command and provide an executable program or shared library as argument:

libtree -p /usr/bin/mkdir

By default, some of standard dependencies are not displayed. The -v option can be used to get more verbose output.

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

Uninstall libtree

If you wish to remove libtree, delete executable file:

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

Leave a Comment

Cancel reply

Your email address will not be published.