How To Install libyang on CentOS 8

libyang is YANG data modeling language library YANG data modeling language library

Introduction

In this tutorial we learn how to install libyang on CentOS 8.

What is libyang

Libyang is YANG data modeling language parser and toolkit written (and providing API) in C. libyang 1.0.184 1.el8 x86_64 479 k libyang-1.0.184-1.el8.src.rpm appstream YANG data modeling language library https BSD Libyang is YANG data modeling language parser and toolkit written (and providing API) in C.

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

Install libyang on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo dnf -y install libyang

Install libyang on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo yum -y install libyang

How To Uninstall libyang on CentOS 8

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

sudo dnf remove libyang

libyang Package Contents on CentOS 8

/usr/bin/yanglint
/usr/bin/yangre
/usr/lib/.build-id
/usr/lib/.build-id/00
/usr/lib/.build-id/00/fdb9bf1482b73e210fe32c4940ec48faaff0b3
/usr/lib/.build-id/10
/usr/lib/.build-id/10/61431ebe16a977abe068d73eeb296c147d47e2
/usr/lib/.build-id/27
/usr/lib/.build-id/27/b7adad8e79c06177816059bc4c91001c60611c
/usr/lib/.build-id/50
/usr/lib/.build-id/50/c684b91b6d401bbf665ee617845547b0137ab9
/usr/lib/.build-id/6b
/usr/lib/.build-id/6b/a50bfcc6e9e63b24123ce9dd5a9bb38fe57c1c
/usr/lib/.build-id/71
/usr/lib/.build-id/71/105cd6ae9af9d32ad084a89284fbf2b24611ac
/usr/lib/.build-id/99
/usr/lib/.build-id/99/923117b51dc32340a9e8edf48414007615396f
/usr/lib/.build-id/c7
/usr/lib/.build-id/c7/534b868a8b593a04c0f962980f2507d5d08d57
/usr/lib64/libyang.so.1
/usr/lib64/libyang.so.1.9.2
/usr/lib64/libyang1
/usr/lib64/libyang1/extensions
/usr/lib64/libyang1/extensions/metadata.so
/usr/lib64/libyang1/extensions/nacm.so
/usr/lib64/libyang1/extensions/yangdata.so
/usr/lib64/libyang1/user_types
/usr/lib64/libyang1/user_types/user_inet_types.so
/usr/lib64/libyang1/user_types/user_yang_types.so
/usr/share/licenses/libyang
/usr/share/licenses/libyang/LICENSE
/usr/share/man/man1/yanglint.1.gz
/usr/share/man/man1/yangre.1.gz
/usr/bin/yanglint
/usr/bin/yangre
/usr/lib/.build-id
/usr/lib/.build-id/30
/usr/lib/.build-id/30/98a008915427cb038132457249691c15325bcd
/usr/lib/.build-id/33
/usr/lib/.build-id/33/d97343fd880af4ff4be0d715aee9a017291e23
/usr/lib/.build-id/57
/usr/lib/.build-id/57/76651b2e3b466e4449bb440df2d0cc15c53912
/usr/lib/.build-id/5d
/usr/lib/.build-id/5d/b140116fb47608d32166b76b627085a7f984a1
/usr/lib/.build-id/65
/usr/lib/.build-id/65/22ef0f8a8e6915a4bb91fa9ec919f913bb16cd
/usr/lib/.build-id/9f
/usr/lib/.build-id/9f/7c39b17006bc3e0cfae846a4aafc3c82a150a1
/usr/lib/.build-id/db
/usr/lib/.build-id/db/4f23b8f0c71f2922b25954fa463d78b4917767
/usr/lib/.build-id/f5
/usr/lib/.build-id/f5/301e3b41cca7a27b36d4783834dd01c74c81d6
/usr/lib/libyang.so.1
/usr/lib/libyang.so.1.9.2
/usr/lib/libyang1
/usr/lib/libyang1/extensions
/usr/lib/libyang1/extensions/metadata.so
/usr/lib/libyang1/extensions/nacm.so
/usr/lib/libyang1/extensions/yangdata.so
/usr/lib/libyang1/user_types
/usr/lib/libyang1/user_types/user_inet_types.so
/usr/lib/libyang1/user_types/user_yang_types.so
/usr/share/licenses/libyang
/usr/share/licenses/libyang/LICENSE
/usr/share/man/man1/yanglint.1.gz
/usr/share/man/man1/yangre.1.gz

References

Summary

In this tutorial we learn how to install libyang on CentOS 8 using yum and dnf.