metalaureate
metalaureate

Reputation: 7732

How to install Lua DBI on Mac OS X

I'm taking the advice of this page for Mac to compile Lua-DBI from source:

http://prosody.im/doc/depends#luadbi

But I don't know how to compile it from source. I get the following error.

make psql
gcc -c -o build/dbd_postgresql_main.o dbd/postgresql/main.c -g -pedantic -Wall -O2 -shared -fpic -I /usr/include/lua5.1 -I /usr/include/mysql -I /usr/include/postgresql/ -I /opt/ibm/db2exc/V9.5/include/ -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -I .
clang: warning: argument unused during compilation: '-shared'
In file included from dbd/postgresql/main.c:1:
dbd/postgresql/dbd_postgresql.h:1:10: fatal error: 'libpq-fe.h' file not found
#include <libpq-fe.h>
         ^
1 error generated.

I'm a noob. Appreciate any help.

Upvotes: 1

Views: 462

Answers (1)

Kent Shikama
Kent Shikama

Reputation: 4060

You can get LuaDBI without having to build it from the source on Mac OS X with LuaRocks: luarocks install luadbi-mysql (for MYSQL) and luarocks install luasql-postgres (for Postgres).

Luarocks itself can be installed on Mac using HomeBrew as follows:

brew update
brew install luarocks

For more information see the LuaRocks github repo.

Upvotes: 1

Related Questions