lunarmodules / luasql

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

can't find "libpq-fe.h" for postgres on ubuntu18.04 #112

Open xuqinghan opened 5 years ago

xuqinghan commented 5 years ago

pg in run in docker, so host(a Notebook ) is not install pg, but just install libpg-dev so libpq-fe.h is exists at /usr/include/postgresql

but luasql install can't find it, even set PGSQL_DIR:

sudo luarocks install luasql-postgres PGSQL_DIR=/usr/include/postgresql

Error: Could not find header file for PGSQL No file libpq-fe.h in /usr/include/postgresql/include You may have to install PGSQL in your system and/or pass PGSQL_DIR or PGSQL_INCDIR to the luarocks command. Example: luarocks install luasql-postgres PGSQL_DIR=/usr/local

add a line ?

Example: luarocks install luasql-postgres PGSQL_INCDIR=/usr/include/postgresql PGSQL_LIBDIR=/usr/lib

tomasguisasola commented 5 years ago

Hi xuqinghan

The problem you've mentioned is not related to LuaSQL. It is related to the configuration of your docker container. You have to install everything in the container, despite what is installed your host machine.

Regards, Tomás

Em sex, 12 de abr de 2019 às 22:22, xuqinghan notifications@github.com escreveu:

pg in run in docker, so host(a Notebook ) is not install pg, but just install libpg-dev so libpq-fe.h is exists at /usr/include/postgresql

but luasql install can't find it, even set PGSQL_DIR:

sudo luarocks install luasql-postgres PGSQL_DIR=/usr/include/postgresql Warning: The directory '/home/xuqinghan/.cache/luarocks' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing /usr/local/lib/luarocks/rocks-5.3/luarocks/3.0.4-1/bin/luarocks with sudo, you may want sudo's -H flag. Installing https://luarocks.org/luasql-postgres-2.4.0-1.src.rock

Error: Could not find header file for PGSQL No file libpq-fe.h in /usr/include/postgresql/include You may have to install PGSQL in your system and/or pass PGSQL_DIR or PGSQL_INCDIR to the luarocks command. Example: luarocks install luasql-postgres PGSQL_DIR=/usr/local

how to set the include path without install pg? or let the path searching more smartly?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.