How To Install lua-socket on Rocky Linux 8

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

Introduction

In this tutorial we learn how to install lua-socket on Rocky Linux 8.

What is lua-socket

LuaSocket is a Lua extension library that is composed by two parts that provides support for the TCP and UDP 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 Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install lua-socket.

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

sudo dnf -y install lua-socket

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

sudo yum -y install lua-socket

How To Uninstall lua-socket on Rocky Linux 8

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

sudo dnf remove lua-socket

lua-socket Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/01
/usr/lib/.build-id/01/ada1e17c825f0a28eca0d8d8a8127157a9669c
/usr/lib/.build-id/08
/usr/lib/.build-id/08/a2850d0d89c88dbf3db19fb256a232f9d4c637
/usr/lib/.build-id/93
/usr/lib/.build-id/93/146385881898a17d82b1f0ad03154249ded3fe
/usr/lib/.build-id/bb
/usr/lib/.build-id/bb/9fe86daf98006a6aec1a57d2fc460ca81708c0
/usr/lib64/lua/5.3/mime
/usr/lib64/lua/5.3/mime/core.so
/usr/lib64/lua/5.3/socket
/usr/lib64/lua/5.3/socket/core.so
/usr/lib64/lua/5.3/socket/serial.so
/usr/lib64/lua/5.3/socket/unix.so
/usr/share/doc/lua-socket
/usr/share/doc/lua-socket/README
/usr/share/doc/lua-socket/dns.html
/usr/share/doc/lua-socket/ftp.html
/usr/share/doc/lua-socket/http.html
/usr/share/doc/lua-socket/index.html
/usr/share/doc/lua-socket/installation.html
/usr/share/doc/lua-socket/introduction.html
/usr/share/doc/lua-socket/ltn12.html
/usr/share/doc/lua-socket/lua05.ppt
/usr/share/doc/lua-socket/luasocket.png
/usr/share/doc/lua-socket/mime.html
/usr/share/doc/lua-socket/reference.css
/usr/share/doc/lua-socket/reference.html
/usr/share/doc/lua-socket/smtp.html
/usr/share/doc/lua-socket/socket.html
/usr/share/doc/lua-socket/tcp.html
/usr/share/doc/lua-socket/udp.html
/usr/share/doc/lua-socket/url.html
/usr/share/licenses/lua-socket
/usr/share/licenses/lua-socket/LICENSE
/usr/share/lua/5.3/ltn12.lua
/usr/share/lua/5.3/mime.lua
/usr/share/lua/5.3/socket
/usr/share/lua/5.3/socket.lua
/usr/share/lua/5.3/socket/ftp.lua
/usr/share/lua/5.3/socket/headers.lua
/usr/share/lua/5.3/socket/http.lua
/usr/share/lua/5.3/socket/smtp.lua
/usr/share/lua/5.3/socket/tp.lua
/usr/share/lua/5.3/socket/url.lua

References

Summary

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