How To Install cjson on Fedora 34

cjson is Ultralightweight JSON parser in ANSI C Ultralightweight JSON parser in ANSI C

Introduction

In this tutorial we learn how to install cjson on Fedora 34.

What is cjson

cJSON aims to be the dumbest possible parser that you can get your job done with. It’s a single file of C, and a single header file. cjson 1.7.14 3.fc34 x86_64 31 k cjson-1.7.14-3.fc34.src.rpm fedora Ultralightweight JSON parser in ANSI C https MIT and ASL 2.0 cJSON aims to be the dumbest possible parser that you can get your job done with. It’s a single file of C, and a single header file.

We can use yum or dnf to install cjson on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install cjson.

Install cjson on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install cjson using dnf by running the following command:

sudo dnf -y install cjson

Install cjson on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install cjson using yum by running the following command:

sudo yum -y install cjson

How To Uninstall cjson on Fedora 34

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

sudo dnf remove cjson

cjson Package Contents on Fedora 34

/usr/lib/.build-id
/usr/lib/.build-id/05
/usr/lib/.build-id/05/f657e9b623a407d23d36d27e6e0ffdcfe3388a
/usr/lib/libcjson.so.1
/usr/lib/libcjson.so.1.7.14
/usr/share/doc/cjson
/usr/share/doc/cjson/README.md
/usr/share/licenses/cjson
/usr/share/licenses/cjson/LICENSE
/usr/lib/.build-id
/usr/lib/.build-id/52
/usr/lib/.build-id/52/93f7815898cf84a463544fd939d6ce0a789380
/usr/lib64/libcjson.so.1
/usr/lib64/libcjson.so.1.7.14
/usr/share/doc/cjson
/usr/share/doc/cjson/README.md
/usr/share/licenses/cjson
/usr/share/licenses/cjson/LICENSE

References

Summary

In this tutorial we learn how to install cjson on Fedora 34 using yum and dnf.