How To Install libcds-dev on Debian 12

Learn how to install libcds-dev on Debian 12 with this tutorial. libcds-dev is Concurrent Data Structures (CDS) library - development

Introduction

In this tutorial we learn how to install libcds-dev on Debian 12.

What is libcds-dev

libcds-dev is:

The Concurrent Data Structures (CDS) library is a collection of concurrent containers that don’t require external (manual) synchronization for shared access, and safe memory reclamation (SMR) algorithms like Hazard Pointer and user-space RCU that is used as an epoch-based SMR.

CDS is mostly header-only template library. Only SMR core implementation is segregated to .so/.dll file.

The library contains the implementations of the following containers:

- lock-free stack with optional elimination support
- several algo for lock-free queue, including classic Michael & Scott
  algorithm and its derivatives, the flat combining queue, the
  segmented queue.
- several implementation of unordered set/map - lock-free and
  fine-grained lock-based
- flat-combining technique
- lock-free skip-list
- lock-free FeldmanHashMap/Set Multi-Level Array Hash with thread-safe
  bidirectional iterator support Bronson's et al algorithm for
  fine-grained lock-based AVL tree

Generally, each container has an intrusive and non-intrusive (STL-like) version belonging to cds::intrusive and cds::container namespace respectively.

This package contains the development files.

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

Install libcds-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 libcds-dev using apt-get by running the following command:

sudo apt-get -y install libcds-dev

Install libcds-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libcds-dev

Install libcds-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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install libcds-dev

How To Uninstall libcds-dev on Debian 12

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

sudo apt-get remove libcds-dev

Uninstall libcds-dev And Its Dependencies

To uninstall libcds-dev and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove libcds-dev

Remove libcds-dev Configurations and Data

To remove libcds-dev configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge libcds-dev

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

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

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

Dependencies

libcds-dev have the following dependencies:

References

Summary

In this tutorial we learn how to install libcds-dev package on Debian 12 using different package management tools: apt, apt-get and aptitude.