Open dutchie31 opened 8 years ago
Hello, i have the similar problem. it is installed on Centos 7 but installion not copy files to shared directory. So it gives error. I tried to so many way but could't find a solution.
`lua: test1.lua:1: module 'luasql.mysql' not found: no field package.preload['luasql.mysql'] no file './luasql/mysql.lua' no file '/usr/share/lua/5.1/luasql/mysql.lua' no file '/usr/share/lua/5.1/luasql/mysql/init.lua' no file '/usr/lib64/lua/5.1/luasql/mysql.lua' no file '/usr/lib64/lua/5.1/luasql/mysql/init.lua' no file './luasql/mysql.so' no file '/usr/lib64/lua/5.1/luasql/mysql.so' no file '/usr/lib64/lua/5.1/loadall.so' no file './luasql.so' no file '/usr/lib64/lua/5.1/luasql.so' no file '/usr/lib64/lua/5.1/loadall.so' stack traceback: C: in function 'require' test1.lua:1: in main chunk
`
[root@localhost luasql]# make mysql gcc -O2 -std=gnu99 -Wall -Wmissing-prototypes -Wmissing-declarations -pedantic -fPIC -I/usr/include/lua5.1 -DLUASQL_VERSION_NUMBER='"2.3.5"' -c src/luasql.c -o src/luasql.o gcc -O2 -std=gnu99 -Wall -Wmissing-prototypes -Wmissing-declarations -pedantic -fPIC -I/usr/include/lua5.1 -DLUASQL_VERSION_NUMBER='"2.3.5"' src/ls_mysql.c -o src/mysql.so -shared src/luasql.o -I/usr/include/mysql -L/usr/lib64/mysql -lmysqlclient -lz [root@localhost luasql]# make install mkdir -p /usr/lib/lua/5.1/luasql cp src/*.so /usr/lib/lua/5.1/luasql
Hi
The problem is you are installing in a place (/usr/lib/lua/5/1) but searching in another one (as listed by require). You can change your package.cpath or adapt the Makefile to install the driver at the proper place for your OS.
Regards, Tomás
On 2017-09-12 10:08, Yasin CANER wrote:
Hello, i have the similar problem. it is installed on Centos 7 but installion not copy files to shared directory. So it gives error. I tried to so many way but could't find a solution.
lua: test1.lua:1: module 'luasql.mysql' not found: no field package.preload['luasql.mysql'] no file './luasql/mysql.lua' no file '/usr/share/lua/5.1/luasql/mysql.lua' no file '/usr/share/lua/5.1/luasql/mysql/init.lua' no file '/usr/lib64/lua/5.1/luasql/mysql.lua' no file '/usr/lib64/lua/5.1/luasql/mysql/init.lua' no file './luasql/mysql.so' no file '/usr/lib64/lua/5.1/luasql/mysql.so' no file '/usr/lib64/lua/5.1/loadall.so' no file './luasql.so' no file '/usr/lib64/lua/5.1/luasql.so' no file '/usr/lib64/lua/5.1/loadall.so' stack traceback: C: in function 'require' test1.lua:1: in main chunk
[root@localhost luasql]# make mysql gcc -O2 -std=gnu99 -Wall -Wmissing-prototypes -Wmissing-declarations -pedantic -fPIC -I/usr/include/lua5.1 -DLUASQL_VERSION_NUMBER='"2.3.5"' -c src/luasql.c -o src/luasql.o gcc -O2 -std=gnu99 -Wall -Wmissing-prototypes -Wmissing-declarations -pedantic -fPIC -I/usr/include/lua5.1 -DLUASQL_VERSION_NUMBER='"2.3.5"' src/ls_mysql.c -o src/mysql.so -shared src/luasql.o -I/usr/include/mysql -L/usr/lib64/mysql -lmysqlclient -lz [root@localhost luasql]# make install mkdir -p /usr/lib/lua/5.1/luasql cp src/*.so /usr/lib/lua/5.1/luasql
-- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [1], or mute the thread [2].
*
Links:
[1] https://github.com/keplerproject/luasql/issues/44#issuecomment-328847846 [2] https://github.com/notifications/unsubscribe-auth/AAIA7Qgf6WTZyDqmjIGcim0cnPL-h32oks5shoJegaJpZM4IQrMS
@tomasguisasola Hi , After copy .so files in src to /usr/share/lua path, it works fine. Thanks
I'm trying to compile LuaSQL on CentOS 7 but whatever I try I can't make the module actually connect to a database:
CentOS 7 is installed with:
I'm building luasql-2.3.1 using the following config:
It seems to be generating a valid mysql.so:
But whenever I use this module it simply fails to connect to MariaDB with the above listed error message. A test connection from the command line works without issues:
SELinux is disabled:
Anyone got LuaSQL successfully built on CentOS 7 or have any idea what's going wrong here?