How To Install gn on Fedora 34

gn is Meta-build system that generates build files for Ninja

Introduction

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

What is gn

GN is a meta-build system that generates build files for Ninja.

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

Install gn 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 gn using dnf by running the following command:

sudo dnf -y install gn

Install gn 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 gn using yum by running the following command:

sudo yum -y install gn

How To Uninstall gn on Fedora 34

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

sudo dnf remove gn

gn Package Contents on Fedora 34

/usr/bin/gn
/usr/lib/.build-id
/usr/lib/.build-id/90
/usr/lib/.build-id/90/f527c8b399e6ec757f5c55f6d66a5b204091f9
/usr/share/emacs/site-lisp/site-start.d/gn-mode.el
/usr/share/licenses/gn
/usr/share/licenses/gn/LICENSE
/usr/share/man/man1/gn.1.gz
/usr/share/vim/vimfiles/autoload/gn.vim
/usr/share/vim/vimfiles/ftdetect/gnfiletype.vim
/usr/share/vim/vimfiles/ftplugin/gn.vim
/usr/share/vim/vimfiles/gn-format.py
/usr/share/vim/vimfiles/syntax/gn.vim

References

Summary

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