Cyberithub

How to Install libssl-dev package on Ubuntu 22.04 LTS (Jammy Jellyfish)

Advertisements

In this article, we will see how to install libssl-dev package on Ubuntu 22.04 LTS (Jammy Jellyfish). If you are looking to implement SSL and TLS cryptographic protocols for secure communication over Internet then you need to install development libraries, header files etc for libssl and libcrypto which are all bundled in one package called libssl-dev. This package comes under the umbrella of  OpenSSL Project. It is free, open-source and very easy to install in any of the linux based systems. Here we will see the steps to install libssl-dev package on Ubuntu 22.04 LTS based systems.

 

How to Install libssl-dev package on Ubuntu 22.04 LTS (Jammy Jellyfish)

How to Install libssl-dev package on Ubuntu 22.04 LTS (Jammy Jellyfish)

Also Read: How to Install cmake on Ubuntu 22.04 LTS (Jammy Jellyfish)

Step 1: Prerequisites

a) You should have a running Ubuntu 22.04 LTS Server.

b) You should have sudo or root access to run privileged commands.

c) You should have apt or apt-get utility available in your Server.

 

Step 2: Update Your Server

You need to first check for all the available updates and then install it by using sudo apt update && sudo apt upgrade command as shown below.

cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
[sudo] password for cyberithub:
Hit:1 http://in.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:4 https://artifacts.elastic.co/packages/8.x/apt stable InRelease
Get:5 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B]
Get:6 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB]
Get:7 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [579 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [799 kB]
Get:9 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,060 B]
Get:10 http://in.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [445 kB]
Get:11 http://in.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [202 kB]
Get:12 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [99.6 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [15.4 kB]
Get:14 http://in.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [580 kB]
Get:15 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages [267 kB]
..............................................................

 

Step 3: Install libssl-dev 

In the next step, you can install libssl-dev package from default Ubuntu repo by using sudo apt install libssl-dev command as shown below. This will download the package along with all its dependencies.

cyberithub@ubuntu:~$ sudo apt install libssl-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
libssl-doc
The following NEW packages will be installed:
libssl-dev
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 2,372 kB of archives.
After this operation, 12.4 MB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libssl-dev amd64 3.0.2-0ubuntu1.10 [2,372 kB]
Fetched 2,372 kB in 2s (1,482 kB/s)
Selecting previously unselected package libssl-dev:amd64.
(Reading database ... 229079 files and directories currently installed.)
Preparing to unpack .../libssl-dev_3.0.2-0ubuntu1.10_amd64.deb ...
Unpacking libssl-dev:amd64 (3.0.2-0ubuntu1.10) ...
Setting up libssl-dev:amd64 (3.0.2-0ubuntu1.10) ...

 

Step 4: Verify Installation

After successful installation, you can verify the installed files path by using dpkg -L libssl-dev command as shown below.

cyberithub@ubuntu:~$ dpkg -L libssl-dev
/.
/usr
/usr/include
/usr/include/openssl
/usr/include/openssl/aes.h
/usr/include/openssl/asn1.h
/usr/include/openssl/asn1_mac.h
/usr/include/openssl/asn1err.h
/usr/include/openssl/asn1t.h
/usr/include/openssl/async.h
/usr/include/openssl/asyncerr.h
/usr/include/openssl/bio.h
/usr/include/openssl/bioerr.h
/usr/include/openssl/blowfish.h
/usr/include/openssl/bn.h
/usr/include/openssl/bnerr.h
/usr/include/openssl/buffer.h
/usr/include/openssl/buffererr.h
........................................................

 

Step 5: Uninstall libssl-dev

If you don't need libssl-dev package anymore in your system then you can choose to uninstall it by using sudo apt remove libssl-dev command as shown below. But you need to be very careful before removing this package as sometimes it might be possibly in use by some other active running applications. Removing in that case could result into a catastrophic failure of that running applications in a critical server.

cyberithub@ubuntu:~$ sudo apt remove libssl-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
libssl-dev
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 12.4 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 229227 files and directories currently installed.)
Removing libssl-dev:amd64 (3.0.2-0ubuntu1.10) ...

Leave a Comment