How To Install luarocks on AlmaLinux 8

In this tutorial we learn how to install luarocks in AlmaLinux 8. luarocks is A deployment and management system for Lua modules

Introduction

In this tutorial we learn how to install luarocks on AlmaLinux 8.

What is luarocks

LuaRocks allows you to install Lua modules as self-contained packages called “rocks”, which also contain version dependency information. This information is used both during installation, so that when one rock is requested all rocks it depends on are installed as well, and at run time, so that when a module is required, the correct version is loaded. LuaRocks supports both local and remote repositories, and multiple local rocks trees.

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

Install luarocks on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install luarocks

Install luarocks on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install luarocks

How To Uninstall luarocks on AlmaLinux 8

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

sudo dnf remove luarocks

References

Summary

In this tutorial we learn how to install luarocks on AlmaLinux 8 using yum and dnf.