Cyberithub

How to Install libtool on Ubuntu 22.04

Advertisements

In this article, we will see how to install libtool on Ubuntu 22.04. Libtool is a very popular free and open source tool used for creating and managing shared libraries across various linux and unix platforms. It is part of GNU build system along with other tools like autoconf and automake. It makes developers life easy by allowing them to build and compile application for various linux and unix distributions without worrying much about doing library management in them.

Libtool specializes in resolving dependencies and linking libraries in correct order thus generating the final build. It is quite capable in handling complex scenarios which makes it an ideal tool to use in software building process. It is also easy to install on almost all the famous unix and linux platforms. Below we will see the steps to install on Ubuntu 22.04 based systems.

 

How to Install libtool on Ubuntu 22.04 2

How to Install libtool on Ubuntu 22.04

Also Read: How to Install M4 Macro Processor on Ubuntu or Debian Linux

Step 1: Prerequisites

a) You would require a fully functional Ubuntu 22.04 based systems.

b) You would also require sudo or root access to run update and install libtool package.

c) You would need a default Ubuntu package manager such as apt or apt-get to install the package from repo.

d) Minimum hardware requirements:-

  • CPU: Any modern processor should be enough to run projects using libtool.
  • RAM: Minimum of 1GB or more would be recommended for flexible usage.
  • Storage: Although storage space required is minimal (less than 10MB) but a space of atleast 1Gb would be highly recommended.

 

Step 2: Update Your Server

Although not mandatory but it is highly recommended to update package repository cache and install any new available upgrades by using sudo apt update && sudo apt upgrade command before installing any new packages on the system. This provides stability to system and helps avoid any broken package errors.

cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
Hit:1 https://aquasecurity.github.io/trivy-repo/deb jammy InRelease
Hit:2 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu jammy InRelease
Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Ign:6 https://ppa.launchpadcontent.net/stebbins/handbrake-releases/ubuntu jammy InRelease
Err:7 https://ppa.launchpadcontent.net/stebbins/handbrake-releases/ubuntu jammy Release
.......................................................

 

Step 3: Install libtool

Libtool can be installed through both apt and aptitude package manager. You can choose to use any of the package manager as per your requirements.

a) Using Apt

If you decided to use apt package manager then you can run sudo apt install libtool command to install the package along with all its required dependencies from default Ubuntu repo as shown below.

cyberithub@ubuntu:~$ sudo apt install libtool
[sudo] password for cyberithub:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libltdl-dev
Suggested packages:
libtool-doc gfortran | fortran95-compiler gcj-jdk
The following NEW packages will be installed:
libltdl-dev libtool
0 upgraded, 2 newly installed, 0 to remove and 35 not upgraded.
Need to get 333 kB of archives.
After this operation, 2,187 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 libltdl-dev amd64 2.4.6-15build2 [169 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 libtool all 2.4.6-15build2 [164 kB]
Fetched 333 kB in 2s (180 kB/s)
Selecting previously unselected package libltdl-dev:amd64.
(Reading database ... 245133 files and directories currently installed.)
Preparing to unpack .../libltdl-dev_2.4.6-15build2_amd64.deb ...
Unpacking libltdl-dev:amd64 (2.4.6-15build2) ...
Selecting previously unselected package libtool.
Preparing to unpack .../libtool_2.4.6-15build2_all.deb ...
Unpacking libtool (2.4.6-15build2) ...
Setting up libtool (2.4.6-15build2) ...
Setting up libltdl-dev:amd64 (2.4.6-15build2) ...
Processing triggers for man-db (2.10.2-1) ...

b) Using Aptitude

You can also install libtool through aptitude package manager. You just have to run sudo aptitude install libtool command as shown below. Although both apt and aptitude works great but in comparison to apt, aptitude provides better handling in resolving complex dependencies during a package installation.

cyberithub@ubuntu:~$ sudo aptitude install libtool
[sudo] password for cyberithub:
The following NEW packages will be installed:
libtool
0 packages upgraded, 1 newly installed, 0 to remove and 35 not upgraded.
Need to get 164 kB of archives. After unpacking 1,227 kB will be used.
Get: 1 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 libtool all 2.4.6-15build2 [164 kB]
Fetched 164 kB in 1s (167 kB/s)
Selecting previously unselected package libtool.
(Reading database ... 245181 files and directories currently installed.)
Preparing to unpack .../libtool_2.4.6-15build2_all.deb ...
Unpacking libtool (2.4.6-15build2) ...
Setting up libtool (2.4.6-15build2) ...
Processing triggers for man-db (2.10.2-1) ...

 

Step 4: Uninstall libtool

You can also think of uninstalling libtool in case you don't need it anymore. Like installation, libtool can also be uninstalled using apt or aptitude package manager.

a) Using Apt

Even if you installed libtool from aptitude, you will still be able to remove the package using apt package manager by running sudo apt remove libtool command as shown below.

cyberithub@ubuntu:~$ sudo apt remove libtool
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
libltdl-dev
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
libtool
0 upgraded, 0 newly installed, 1 to remove and 35 not upgraded.
After this operation, 1,227 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 245200 files and directories currently installed.)
Removing libtool (2.4.6-15build2) ...
Processing triggers for man-db (2.10.2-1) ...

If you are looking to remove libtool along with all its dependencies then run sudo apt remove libtool --auto-remove command.

cyberithub@ubuntu:~$ sudo apt remove libtool --auto-remove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
libltdl-dev libtool
0 upgraded, 0 newly installed, 2 to remove and 35 not upgraded.
After this operation, 2,187 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 245208 files and directories currently installed.)
Removing libltdl-dev:amd64 (2.4.6-15build2) ...
Removing libtool (2.4.6-15build2) ...
Processing triggers for man-db (2.10.2-1) ...

If you are looking to remove not just libtool package but also all its dependent packages and the related configuration files then run sudo apt purge libtool --auto-remove command as you can see below.

cyberithub@ubuntu:~$ sudo apt purge libtool --auto-remove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
libltdl-dev* libtool*
0 upgraded, 0 newly installed, 2 to remove and 35 not upgraded.
After this operation, 2,187 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 245208 files and directories currently installed.)
Removing libltdl-dev:amd64 (2.4.6-15build2) ...
Removing libtool (2.4.6-15build2) ...
Processing triggers for man-db (2.10.2-1) ...

b) Using Aptitude

Similarly, even if you installed libtool using apt,  you will still be able to remove the package by using sudo aptitude remove libtool command as shown below.

cyberithub@ubuntu:~$ sudo aptitude remove libtool
The following packages will be REMOVED:
libltdl-dev{u} libtool
0 packages upgraded, 0 newly installed, 2 to remove and 35 not upgraded.
Need to get 0 B of archives. After unpacking 2,187 kB will be freed.
Do you want to continue? [Y/n/?] Y
(Reading database ... 245200 files and directories currently installed.)
Removing libltdl-dev:amd64 (2.4.6-15build2) ...
Removing libtool (2.4.6-15build2) ...
Processing triggers for man-db (2.10.2-1) ...

Leave a Comment