lunarmodules / luasql

LuaSQL is a simple interface from Lua to a DBMS.
http://lunarmodules.github.io/luasql
539 stars 191 forks source link

install problem #33

Closed grasses closed 9 years ago

grasses commented 9 years ago

how to install in mac. my lua path is: /usr/local/lib/lua

tomasguisasola commented 9 years ago

Hi

I need more information to help you.

To install LuaSQL you need to choose a database driver according to your database (you will also need a developer's package for that database, to provide the header files necessary to compile C code). You can install it manually, using the Makefile provided by the package, or you can install it using LuaRocks. Lua version (and the header files) is (are) also a necessary information.

Regards, Tomás

On 2015-05-13 14:12, homeway wrote:

how to install in mac. my lua path is: /usr/local/lib/lua

Reply to this email directly or view it on GitHub [1].

*

Links:

[1] https://github.com/keplerproject/luasql/issues/33

grasses commented 9 years ago

My Lua version is Lua 5.2.3, I want to install luasql.mysql. I do not know how to install manually using the Makefile in Mac. then I try it by luarocks.

I use command: luarocks install luasql-mysql MYSQL_DIR=/usr/local/Cellar/mysql/5.6.23/include/mysql

It tells me: Could not find expected file mysql.h, or mysql.h for MYSQL -- you may have to install MYSQL in your system and/or pass MYSQL_DIR or MYSQL_INCDIR to the luarocks command.

I can make sure my mysql is install at /usr/local/Cellar/mysql/5.6.23/

grasses commented 9 years ago

I can find mysql.h in /usr/local/Cellar/mysql/5.6.23/include/mysql My mysql is ok.

hishamhm commented 9 years ago

For the include dir, use MYSQL_INCDIR instead.

luarocks install luasql-mysql MYSQL_INCDIR=/usr/local/Cellar/mysql/5.6.23/include/mysql
grasses commented 9 years ago

It`s ok now. Thank you!!