How To Install libbitmask-dev on Ubuntu 18.04

In this tutorial we learn how to install libbitmask-dev on Ubuntu 18.04. libbitmask-dev is header files and docs for libbitmask

Introduction

In this tutorial we learn how to install libbitmask-dev on Ubuntu 18.04.

What is libbitmask-dev

libbitmask-dev is:

Contains the header files and documentation for libbitmask for use in developing applications that use the libbitmask library.

This Bitmask library supports multi-word bitmask operations for applications programmed in ‘C’. It works in conjunction with recent Linux kernel support for processor and memory placement on multiprocessor SMP and NUMA systems. The cpuset library, being developed in parallel, depends on this bitmask library.

Bitmasks provide multi-word bit masks and operations thereon to do such things as set and clear bits, intersect and union masks, query bits, and display and parse masks.

The initial intended use for these bitmasks is to represent sets of CPUs and Memory Nodes, when configuring large SMP and NUMA systems. However there is little in the semantics of bitmasks that is specific to this particular use, and bitmasks should be usable for other purposes that had similar design requirements.

These bitmasks share the same underlying layout as the bitmasks used by the Linux kernel to represent sets of CPUs and Memory Nodes. Unlike the kernel bitmasks, these bitmasks use dynamically allocated memory and are manipulated via a pointer. This enables a program to work correctly on systems with various numbers of CPUs and Nodes, without recompilation.

There is a related cpuset library which uses the bitmask type provided here to represent sets of CPUs and Memory Nodes. The internal representation (as an array of unsigned longs, in little endian order) is directly compatible with the sched_setaffinity(2) and sched_getaffinity(2) system calls (added in Linux 2.6).

There are three methods to install libbitmask-dev on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libbitmask-dev Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libbitmask-dev using apt-get by running the following command:

sudo apt-get -y install libbitmask-dev

Install libbitmask-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libbitmask-dev using apt by running the following command:

sudo apt -y install libbitmask-dev

Install libbitmask-dev Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libbitmask-dev using aptitude by running the following command:

sudo aptitude -y install libbitmask-dev

How To Uninstall libbitmask-dev on Ubuntu 18.04

To uninstall only the libbitmask-dev package we can use the following command:

sudo apt-get remove libbitmask-dev

Uninstall libbitmask-dev And Its Dependencies

To uninstall libbitmask-dev and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libbitmask-dev

Remove libbitmask-dev Configurations and Data

To remove libbitmask-dev configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libbitmask-dev

Remove libbitmask-dev configuration, data, and all of its dependencies

We can use the following command to remove libbitmask-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libbitmask-dev

References

Summary

In this tutorial we learn how to install libbitmask-dev package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.