After Googling more, I noticed I shouldn't use `http.request` but `ssl.https` because of the use of secured protocol
Unfortunately that's not so easy...
$ sudo luarocks install luasec
Warning: falling back to wget - install luasec to get native HTTPS support
I'm trying to download a file using http.request using Lua 5.4.2 / LuaRocks 3.7.0 / luasocket-3.0rc1-2.src.rock and this code
local http = require("socket.http")
url = "https://www.sia.aviation-civile.gouv.fr/dvd/eAIP_07_OCT_2021/Atlas-VAC/PDF_AIPparSSection/VAC/AD/AD-2.LFBI.pdf"
Problem fixed... that was simply because running make should be done in the correct directory (which wasn't the case).
For those who might be interested here is a Github project I did for installing Lua and LuaRocks from source in a Linux Ubuntu OS.
For those who might an interest for such a Vagrant env... here is my Vagrantfile which should install Lua 5.4.3 and LuaRocks 3.7.0 in an Ubuntu Impish Indri VM.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# lua_version_major_minor = "5.4"
I'm looking for a Vagrant environment for Lua and LuaRocks
I noticed on Github
This use the luajit-rocks that provides LuaJIT and Luarocks in just one location.
Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-159-generic x86_64)
The problem seems to be known...
I browse to Lua Binaries
And noticed that LuaBinaries - Browse /5.4.2 at SourceForge.net
display a green button
Download Latest Versionlua-5.3.6_Win32_bin.zip (378.1 kB)
I may have missed something about how version numbering is working for lua but I thought that 5.4.2 is latest...
I now have in my Windows 10 Lua install
> dir c:\lua
Répertoire : C:\lua
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 13/10/2021 08:27 356234 lua54.dll
-a---- 13/10/2021 08:27...
I'm new to Lua and I need to install luasocket to perform GET request to a HTTP server.
I'm facing an issue (which seems to be quite common) when trying to install luasocket thanks to luarocks.
I'm running Windows Terminal with Windows PowerShell (as user)
luarocks install luasocket...