I wanted to install luasql.mysql with luarocks, and I've ran into a problem. Even though the packages were installed providing mysql.h, luarocks couldn't find it. I solved it eventually:luarocks install luasql-mysql MYSQL_INCDIR=/usr/include/mysqlNow, all prerequisites should be met, to use luasql.mysql, but I'm getting an error:> require luasql.mysqlstdin:1: module 'luasql.mysql' not found:    no field package.preload['luasql.mysql']    no file '/usr/local/share/lua/5.2/luasql/mysql.lua'    no file '/usr/local/share/lua/5.2/luasql/mysql/init.lua'    no file '/usr/local/lib/lua/5.2/luasql/mysql.lua'    no file '/usr/local/lib/lua/5.2/luasql/mysql/init.lua'    no file './luasql/mysql.lua'    no file '/usr/share/lua/5.2/luasql/mysql.lua'    no file '/usr/share/lua/5.2/luasql/mysql/init.lua'    no file './luasql/mysql.lua'    no file '/usr/local/lib/lua/5.2/luasql/mysql.so'    no file '/usr/lib/x86_64-linux-gnu/lua/5.2/luasql/mysql.so'    no file '/usr/lib/lua/5.2/luasql/mysql.so'    no file '/usr/local/lib/lua/5.2/loadall.so'    no file './luasql/mysql.so'    no file '/usr/local/lib/lua/5.2/luasql.so'    no file '/usr/lib/x86_64-linux-gnu/lua/5.2/luasql.so'    no file '/usr/lib/lua/5.2/luasql.so'    no file '/usr/local/lib/lua/5.2/loadall.so'    no file './luasql.so'stack traceback:    [C]: in function 'require'    stdin:1: in main chunk    [C]: in ?Now, in that list, there is no /usr/local/lib/luarocks/rocks/ or anything like that. Also, I can't seem to find a mysql.lua.According to luarocks, luasql-mysql is installed correctly, though:% luarocks listInstalled rocks:----------------luasql-mysql   2.3.0-1 (installed) - /usr/local/lib/luarocks/rocksI believe I did something wrong, but I have no idea where. Also, it seems Lua is quite obscure when it comes to installing additional packages...
Using a lua rock installed with luarocks
package management;mysql;lua
OK, I solved it, and it was quite a stupid mistake:luasql.mysql is only available for Lua 5.1, not Lua 5.2, which I use by default. Running lua5.1 solves the issue:% lua5.1       Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio> require luasql.mysql>...and all is good.Sorry to have created a confusion...