luarocks-admin-5.2 command not found

In this troubleshooting guide we learn how to fix luarocks-admin-5.2 command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

luarocks-admin-5.2: command not found

or when using sudo you get the following error message

sudo: luarocks-admin-5.2: command not found

Solutions to luarocks-admin-5.2: command not found

How To Fix luarocks-admin-5.2: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu luarocks-admin-5.2 is provided by luarocks package.

luarocks is:

This package contains LuaRocks, a tool for managing rocks. A Lua rock is a bundle containing a module and some metadata like compilation instructions and copyright. The command line utility luarocks can download, build, install and remove rocks, properly handling dependencies among them and allowing multiple versions of the same rock to coexist.

The tool installs system-wide rocks in /usr/local when run by the superuser, but a regular user can easily tune it to install rocks in his home directory.

This package also provides the luarocks-admin tool, needed to create a rocks repository, and the documentation for luarocks, describing the command line tools as well as the library to manipulate rocks.

To fix this problem, we can install more using the command below.

sudo apt-get -y install luarocks

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install luarocks.

sudo apt -y install luarocks

Or if you have aptitude installed you can use the following command.

sudo aptitude install luarocks

Summary

In this tutorial we learn how to fix luarocks-admin-5.2 command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.