install LuaSQL on Centos7

538 Views Asked by At

I have a Centos7 box and I need to install LuaSQL to be able to connect a MariaDB to it. I have installed Mariadb, Lua, and luarocks from yum. None of the software on this box is compiled.

I have installed MariaDB-devel and all the development tools. When I run: luarocks install luasql-mysql MYSQL_DIR=/usr/include/mysql/

I get the following error.

Any suggestions?

Installing https://luarocks.org/luasql-mysql-2.4.0-1.src.rock...
Using https://luarocks.org/luasql-mysql-2.4.0-1.src.rock... switching to 'build' mode
gcc -O2 -fPIC -I/usr/include -c src/luasql.c -o src/luasql.o -I/usr/include/mysql/include
gcc -O2 -fPIC -I/usr/include -c src/ls_mysql.c -o src/ls_mysql.o -I/usr/include/mysql/include
gcc -shared -o luasql/mysql.so -L/usr/lib64/lua/5.1 src/luasql.o src/ls_mysql.o -L/usr/include/mysql/lib -Wl,-rpath,/usr/include/mysql/lib: -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status

Error: Build error: Failed compiling module luasql/mysql.so
0

There are 0 best solutions below