Thanks to the help of the StackOverflow community, I was able to correctly install luasql on my computer running Linux CentOS 7.
Now I have a similar problem on Linux Ubuntu 16. I tried the following commands:
sudo apt-get -y install lua-sql-postgres sudo apt-get -y install lua-sql-postgres-dev sudo luarocks install luasql-postgres
And here's the error I get from the system:
Installing https://rocks.moonscript.org/luasql-postgres-2.3.5-2.rockspec... Using https://rocks.moonscript.org/luasql-postgres-2.3.5-2.rockspec... switching to 'build' mode Error: Could not find expected file libpq-fe.h, or libpq-fe.h for PGSQL -- 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
Does anyone know how to solve this problem? Thanks
2 Answers
Answers 1
As suggested by @Knud Larsen first you need to install libpq-dev
.
If it was installed sussecfully then you can see file /usr/include/postgresql/libpq-fe.h
After that try below command.
sudo luarocks PGSQL_INCDIR=/usr/include/postgresql/ install luasql-postgres
Answers 2
Please install the package libpq-dev
:
The file libpq-fe.h
is in /usr/include/postgresql/
http://packages.ubuntu.com/xenial-updates/amd64/libpq-dev/filelist
0 comments:
Post a Comment