How To Install luarocks on Rocky Linux 8

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

Introduction

In this tutorial we learn how to install luarocks on Rocky Linux 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 Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install luarocks.

Install luarocks on Rocky Linux 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 Rocky Linux 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 Rocky Linux 8

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

sudo dnf remove luarocks

luarocks Package Contents on Rocky Linux 8

/etc/luarocks
/etc/luarocks/config-5.3.lua
/usr/bin/luarocks
/usr/bin/luarocks-admin
/usr/lib/luarocks
/usr/lib/luarocks/rocks-5.3
/usr/share/doc/luarocks
/usr/share/doc/luarocks/README.md
/usr/share/licenses/luarocks
/usr/share/licenses/luarocks/COPYING
/usr/share/lua/5.3/luarocks
/usr/share/lua/5.3/luarocks/admin
/usr/share/lua/5.3/luarocks/admin/cache.lua
/usr/share/lua/5.3/luarocks/admin/cmd
/usr/share/lua/5.3/luarocks/admin/cmd/add.lua
/usr/share/lua/5.3/luarocks/admin/cmd/make_manifest.lua
/usr/share/lua/5.3/luarocks/admin/cmd/refresh_cache.lua
/usr/share/lua/5.3/luarocks/admin/cmd/remove.lua
/usr/share/lua/5.3/luarocks/admin/index.lua
/usr/share/lua/5.3/luarocks/argparse.lua
/usr/share/lua/5.3/luarocks/build
/usr/share/lua/5.3/luarocks/build.lua
/usr/share/lua/5.3/luarocks/build/builtin.lua
/usr/share/lua/5.3/luarocks/build/cmake.lua
/usr/share/lua/5.3/luarocks/build/command.lua
/usr/share/lua/5.3/luarocks/build/make.lua
/usr/share/lua/5.3/luarocks/cmd
/usr/share/lua/5.3/luarocks/cmd.lua
/usr/share/lua/5.3/luarocks/cmd/build.lua
/usr/share/lua/5.3/luarocks/cmd/config.lua
/usr/share/lua/5.3/luarocks/cmd/doc.lua
/usr/share/lua/5.3/luarocks/cmd/download.lua
/usr/share/lua/5.3/luarocks/cmd/init.lua
/usr/share/lua/5.3/luarocks/cmd/install.lua
/usr/share/lua/5.3/luarocks/cmd/lint.lua
/usr/share/lua/5.3/luarocks/cmd/list.lua
/usr/share/lua/5.3/luarocks/cmd/make.lua
/usr/share/lua/5.3/luarocks/cmd/new_version.lua
/usr/share/lua/5.3/luarocks/cmd/pack.lua
/usr/share/lua/5.3/luarocks/cmd/path.lua
/usr/share/lua/5.3/luarocks/cmd/purge.lua
/usr/share/lua/5.3/luarocks/cmd/remove.lua
/usr/share/lua/5.3/luarocks/cmd/search.lua
/usr/share/lua/5.3/luarocks/cmd/show.lua
/usr/share/lua/5.3/luarocks/cmd/test.lua
/usr/share/lua/5.3/luarocks/cmd/unpack.lua
/usr/share/lua/5.3/luarocks/cmd/upload.lua
/usr/share/lua/5.3/luarocks/cmd/which.lua
/usr/share/lua/5.3/luarocks/cmd/write_rockspec.lua
/usr/share/lua/5.3/luarocks/core
/usr/share/lua/5.3/luarocks/core/cfg.lua
/usr/share/lua/5.3/luarocks/core/dir.lua
/usr/share/lua/5.3/luarocks/core/manif.lua
/usr/share/lua/5.3/luarocks/core/path.lua
/usr/share/lua/5.3/luarocks/core/persist.lua
/usr/share/lua/5.3/luarocks/core/sysdetect.lua
/usr/share/lua/5.3/luarocks/core/util.lua
/usr/share/lua/5.3/luarocks/core/vers.lua
/usr/share/lua/5.3/luarocks/deplocks.lua
/usr/share/lua/5.3/luarocks/deps.lua
/usr/share/lua/5.3/luarocks/dir.lua
/usr/share/lua/5.3/luarocks/download.lua
/usr/share/lua/5.3/luarocks/fetch
/usr/share/lua/5.3/luarocks/fetch.lua
/usr/share/lua/5.3/luarocks/fetch/cvs.lua
/usr/share/lua/5.3/luarocks/fetch/git.lua
/usr/share/lua/5.3/luarocks/fetch/git_file.lua
/usr/share/lua/5.3/luarocks/fetch/git_http.lua
/usr/share/lua/5.3/luarocks/fetch/git_https.lua
/usr/share/lua/5.3/luarocks/fetch/git_ssh.lua
/usr/share/lua/5.3/luarocks/fetch/hg.lua
/usr/share/lua/5.3/luarocks/fetch/hg_http.lua
/usr/share/lua/5.3/luarocks/fetch/hg_https.lua
/usr/share/lua/5.3/luarocks/fetch/hg_ssh.lua
/usr/share/lua/5.3/luarocks/fetch/sscm.lua
/usr/share/lua/5.3/luarocks/fetch/svn.lua
/usr/share/lua/5.3/luarocks/fs
/usr/share/lua/5.3/luarocks/fs.lua
/usr/share/lua/5.3/luarocks/fs/freebsd.lua
/usr/share/lua/5.3/luarocks/fs/linux.lua
/usr/share/lua/5.3/luarocks/fs/lua.lua
/usr/share/lua/5.3/luarocks/fs/macosx.lua
/usr/share/lua/5.3/luarocks/fs/tools.lua
/usr/share/lua/5.3/luarocks/fs/unix
/usr/share/lua/5.3/luarocks/fs/unix.lua
/usr/share/lua/5.3/luarocks/fs/unix/tools.lua
/usr/share/lua/5.3/luarocks/fs/win32
/usr/share/lua/5.3/luarocks/fs/win32.lua
/usr/share/lua/5.3/luarocks/fs/win32/tools.lua
/usr/share/lua/5.3/luarocks/fun.lua
/usr/share/lua/5.3/luarocks/loader.lua
/usr/share/lua/5.3/luarocks/manif
/usr/share/lua/5.3/luarocks/manif.lua
/usr/share/lua/5.3/luarocks/manif/writer.lua
/usr/share/lua/5.3/luarocks/pack.lua
/usr/share/lua/5.3/luarocks/path.lua
/usr/share/lua/5.3/luarocks/persist.lua
/usr/share/lua/5.3/luarocks/queries.lua
/usr/share/lua/5.3/luarocks/remove.lua
/usr/share/lua/5.3/luarocks/repos.lua
/usr/share/lua/5.3/luarocks/require.lua
/usr/share/lua/5.3/luarocks/results.lua
/usr/share/lua/5.3/luarocks/rockspecs.lua
/usr/share/lua/5.3/luarocks/search.lua
/usr/share/lua/5.3/luarocks/signing.lua
/usr/share/lua/5.3/luarocks/test
/usr/share/lua/5.3/luarocks/test.lua
/usr/share/lua/5.3/luarocks/test/busted.lua
/usr/share/lua/5.3/luarocks/test/command.lua
/usr/share/lua/5.3/luarocks/tools
/usr/share/lua/5.3/luarocks/tools/patch.lua
/usr/share/lua/5.3/luarocks/tools/tar.lua
/usr/share/lua/5.3/luarocks/tools/zip.lua
/usr/share/lua/5.3/luarocks/type
/usr/share/lua/5.3/luarocks/type/manifest.lua
/usr/share/lua/5.3/luarocks/type/rockspec.lua
/usr/share/lua/5.3/luarocks/type_check.lua
/usr/share/lua/5.3/luarocks/upload
/usr/share/lua/5.3/luarocks/upload/api.lua
/usr/share/lua/5.3/luarocks/upload/multipart.lua
/usr/share/lua/5.3/luarocks/util.lua

References

Summary

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