Cyberithub

How to Install libomp-dev on Ubuntu 20.04 LTS (Focal Fossa)

Advertisements

In this article, I will take you through the steps to install libomp-dev on Ubuntu 20.04 LTS (Focal Fossa). libomp-dev is a runtime package which is part of OpenMP implementation that your program code is linked against. It is basically used to manage multiple threads in an OpenMP program while it is executing in your Server. libomp-dev package can be easily installed on almost all the famous linux distributions. Here we will see the steps to install libomp-dev package on Ubuntu 20.04 LTS based System.

 

How to Install libomp-dev on Ubuntu 20.04 LTS (Focal Fossa)

How to Install libomp-dev on Ubuntu 20.04 LTS (Focal Fossa)

Also Read: How to Install dos2unix command on Linux Using 7 Easy Steps

Step 1: Prerequisites

a) You should have a running Ubuntu 20.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

Before installing a new package in your system, it is highly recommended to first install all the available updates and upgrade the packages to the latest version by using sudo apt update && sudo apt upgrade command as shown below.

cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
Hit:2 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:5 https://deb.tableplus.com/debian/20 tableplus InRelease
Get:6 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:1 https://downloads.apache.org/cassandra/debian 40x InRelease
Get:7 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,384 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [559 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2,007 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [327 kB]
..................................................

 

Step 3: Install libomp-dev

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

cyberithub@ubuntu:~$ sudo apt install libomp-dev
[sudo] password for cyberithub:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libomp-10-dev libomp5-10
Suggested packages:
libomp-10-doc
The following NEW packages will be installed:
libomp-10-dev libomp-dev libomp5-10
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 351 kB of archives.
After this operation, 2,281 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libomp5-10 amd64 1:10.0.0-4ubuntu1 [300 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libomp-10-dev amd64 1:10.0.0-4ubuntu1 [47.7 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libomp-dev amd64 1:10.0-50~exp1 [2,824 B]
Fetched 351 kB in 2s (190 kB/s)
Selecting previously unselected package libomp5-10:amd64.
(Reading database ... 196206 files and directories currently installed.)
Preparing to unpack .../libomp5-10_1%3a10.0.0-4ubuntu1_amd64.deb ...
Unpacking libomp5-10:amd64 (1:10.0.0-4ubuntu1) ...
Selecting previously unselected package libomp-10-dev.
Preparing to unpack .../libomp-10-dev_1%3a10.0.0-4ubuntu1_amd64.deb ...
Unpacking libomp-10-dev (1:10.0.0-4ubuntu1) ...
Selecting previously unselected package libomp-dev.
Preparing to unpack .../libomp-dev_1%3a10.0-50~exp1_amd64.deb ...
Unpacking libomp-dev (1:10.0-50~exp1) ...
Setting up libomp5-10:amd64 (1:10.0.0-4ubuntu1) ...
Setting up libomp-10-dev (1:10.0.0-4ubuntu1) ...
Setting up libomp-dev (1:10.0-50~exp1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...

 

Step 4: Verify Installation

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

cyberithub@ubuntu:~$ dpkg -L libomp-dev
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libomp-dev
/usr/share/doc/libomp-dev/NEWS.Debian.gz
/usr/share/doc/libomp-dev/changelog.gz
/usr/share/doc/libomp-dev/copyright

 

Step 5: Uninstall libomp-dev

Once you are done using libomp-dev package, you can choose to uninstall it from your System by using sudo apt remove libomp-dev command as shown below.

NOTE:

Please be careful in running below command as sometimes it might uninstall some of the dependent packages which are being used by other active running applications in the System.
cyberithub@ubuntu:~$ sudo apt remove libomp-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libomp-10-dev libomp5-10
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
libomp-dev
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 14.3 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 196236 files and directories currently installed.)
Removing libomp-dev (1:10.0-50~exp1) ...

Leave a Comment