由于StackOverflow社区的帮助,我能够在我的computer running Linux CentOS 7上正确地安装luasql。
现在,我在Linux 16上遇到了类似的问题。
sudo apt-get -y install lua-sql-postgres
sudo apt-get -y install lua-sql-postgres-dev
sudo luarocks install luasql-postgres这是我从系统中得到的错误:
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有人知道如何解决这个问题吗?谢谢
发布于 2017-04-06 18:59:30
正如@Knud Larsen所建议的:
首先,您需要安装libpq-dev。
如果安装成功,您可以看到文件/usr/include/postgresql/libpq-fe.h。
在此之后,执行命令:
sudo luarocks PGSQL_INCDIR=/usr/include/postgresql/ install luasql-postgres发布于 2017-04-04 02:31:36
请安装软件包libpq-dev:
文件libpq-fe.h位于/usr/include/postgresql/ http://packages.ubuntu.com/xenial-updates/amd64/libpq-dev/filelist中。
https://stackoverflow.com/questions/43189975
复制相似问题