How To Install rapidjson-dev on Ubuntu 22.04
Introduction
In this tutorial we learn how to install rapidjson-dev
on Ubuntu 22.04.
What is rapidjson-dev
rapidjson-dev is:
RapidJSON is an attempt to create the fastest JSON parser and generator.
- Small but complete. Supports both SAX and DOM style API. SAX parser only a few hundred lines of code.
- Fast. In the order of magnitude of strlen(). Optionally supports SSE2/SSE4.2 for acceleration.
- Self-contained. Minimal dependency on standard libraries. No BOOST, not even STL.
- Compact. Each JSON value is 16 or 20 bytes for 32 or 64-bit machines respectively (excluding text string storage). With the custom memory allocator, parser allocates memory compactly during parsing.
- Full RFC7159 compliance. Supports UTF-8, UTF-16 and UTF-32.
- Support both in-situ parsing (directly decode strings into the source JSON text) and non-destructive parsing (decode strings into new buffers).
- Parse number to int/unsigned/int64_t/uint64_t/double depending on input
- Support custom memory allocation. Also, the default memory pool allocator can also be supplied with a user buffer (such as a buffer allocated on user’s heap or programme stack) to minimize allocation.
There are three methods to install rapidjson-dev
on Ubuntu 22.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 rapidjson-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 rapidjson-dev
using apt-get
by running the following command:
sudo apt-get -y install rapidjson-dev
Install rapidjson-dev Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install rapidjson-dev
using apt
by running the following command:
sudo apt -y install rapidjson-dev
Install rapidjson-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 rapidjson-dev
using aptitude
by running the following command:
sudo aptitude -y install rapidjson-dev
How To Uninstall rapidjson-dev on Ubuntu 22.04
To uninstall only the rapidjson-dev
package we can use the following command:
sudo apt-get remove rapidjson-dev
Uninstall rapidjson-dev And Its Dependencies
To uninstall rapidjson-dev
and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:
sudo apt-get -y autoremove rapidjson-dev
Remove rapidjson-dev Configurations and Data
To remove rapidjson-dev
configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge rapidjson-dev
Remove rapidjson-dev configuration, data, and all of its dependencies
We can use the following command to remove rapidjson-dev
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge rapidjson-dev
References
Summary
In this tutorial we learn how to install rapidjson-dev
package on Ubuntu 22.04 using different package management tools: apt
, apt-get
and aptitude
.