How To Install gtksourceview2 on CentOS 7

In this tutorial we learn how to install gtksourceview2 on CentOS 7. gtksourceview2 is A library for viewing source files

Introduction

In this tutorial we learn how to install gtksourceview2 on CentOS 7.

What is gtksourceview2

GtkSourceView is a text widget that extends the standard GTK+ GtkTextView widget. It improves GtkTextView by implementing syntax highlighting and other features typical of a source code editor. This package contains version 2 of GtkSourceView. The older version 1 is contains in the gtksourceview package.

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

Install gtksourceview2 on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install gtksourceview2

Install gtksourceview2 on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install gtksourceview2

How To Uninstall gtksourceview2 on CentOS 7

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

sudo dnf remove gtksourceview2

References

Summary

In this tutorial we learn how to install gtksourceview2 on CentOS 7 using yum and dnf.