Windows Luarocks install permission error

473 views Asked by At

I have been trying for two weeks to install lua 5.1 and luarocks on windows. Please help.

What i have:

  1. Downloaded MinGw
  2. Installed Lua 5.1. I downloaded sources from official site and compiled with MinGw
  3. Downloaded binary luarocks file.
  4. Installed binary files in variable PATH
  5. Windows terminal with admin privileges

If i tried to run next command

luarocks --lua-version=5.1 install luasql-mysql MYSQL_DIR="c:/Program Files/MySQL/MySQL Server 8.0"

I will get error

C:\Windows\system32>luarocks --lua-version=5.1 install luasql-mysql MYSQL_DIR="c:/Program Files/MySQL/MySQL Server 8.0"
Installing https://luarocks.org/luasql-mysql-2.6.0-1.rockspec
Cloning into 'luasql'...
remote: Enumerating objects: 149, done.
remote: Counting objects: 100% (149/149), done.
remote: Compressing objects: 100% (100/100), done.
Receiving objects:  88% (132/149)sed 71 (delta 35), pack-reused 0Receiving objects:  86% (129/149)
Receiving objects: 100% (149/149), 104.00 KiB | 918.00 KiB/s, done.
Resolving deltas: 100% (72/72), done.

luasql-mysql 2.6.0-1 depends on lua >= 5.1 (5.1-1 provided by VM)

Error: Failed setting permission exec for all

I tried to compile luarocks from source and also got access error. What am I doing wrong?

1

There are 1 answers

0
Doyousketch2 On

Possible answer found here: https://stackoverflow.com/a/38534015/3342050

"I was able to install it from source on github (keplerproject/luasql) by modifying the config file. Lua 5.2 was hard-coded in the config file, but I'm running 5.1."

"In the config file, replace LUA_SYS_VER ?= 5.2 with LUA_SYS_VER ?= 5.1"

https://github.com/keplerproject/luasql/blob/8c58fd6ee32faf750daf6e99af015a31402578d1/config#L7