How To Install lua-socket on CentOS 7

In this tutorial we learn how to install lua-socket on CentOS 7. lua-socket is Network support for the Lua language

Introduction

In this tutorial we learn how to install lua-socket on CentOS 7.

What is lua-socket

LuaSocket is a Lua extension library that is composed by two parts transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet. Among the support modules, the most commonly used implement the SMTP, HTTP and FTP. In addition there are modules for MIME, URL handling and LTN12.

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

Install lua-socket on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install lua-socket using yum by running the following command:

sudo yum -y install lua-socket

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

sudo dnf -y install lua-socket

How To Uninstall lua-socket on CentOS 7

To uninstall only the lua-socket package we can use the following command:

sudo dnf remove lua-socket

References

Summary

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