How To Install python-cjson-dbg on Ubuntu 18.04

In this tutorial we learn how to install python-cjson-dbg on Ubuntu 18.04. python-cjson-dbg is Very fast JSON encoder/decoder for Python (debug extension)

Introduction

In this tutorial we learn how to install python-cjson-dbg on Ubuntu 18.04.

What is python-cjson-dbg

python-cjson-dbg is:

JSON stands for JavaScript Object Notation and is a text based lightweight data exchange format which is easy for humans to read/write and for machines to parse/generate. JSON is completely language independent and has multiple implementations in most of the programming languages, making it ideal for data exchange and storage.

The module is written in C and it is up to 250 times faster when compared to the other Python JSON implementations which are written directly in Python. This speed gain varies with the complexity of the data and the operation and is the range of 10-200 times for encoding operations and in the range of 100-250 times for decoding operations.

This package contains the debug extensions and symbols.

There are three methods to install python-cjson-dbg 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 python-cjson-dbg Using apt-get

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

sudo apt-get update

After updating apt database, We can install python-cjson-dbg using apt-get by running the following command:

sudo apt-get -y install python-cjson-dbg

Install python-cjson-dbg Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-cjson-dbg using apt by running the following command:

sudo apt -y install python-cjson-dbg

Install python-cjson-dbg 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 python-cjson-dbg using aptitude by running the following command:

sudo aptitude -y install python-cjson-dbg

How To Uninstall python-cjson-dbg on Ubuntu 18.04

To uninstall only the python-cjson-dbg package we can use the following command:

sudo apt-get remove python-cjson-dbg

Uninstall python-cjson-dbg And Its Dependencies

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

sudo apt-get -y autoremove python-cjson-dbg

Remove python-cjson-dbg Configurations and Data

To remove python-cjson-dbg configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge python-cjson-dbg

Remove python-cjson-dbg configuration, data, and all of its dependencies

We can use the following command to remove python-cjson-dbg configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-cjson-dbg

References

Summary

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