感谢StackOverflow社区的帮助,我能够在我的computer running Linux CentOS 7上正确安装luasql。如何在Linux Ubuntu 16上安装luasql?
现在我有一个类似的问题在Linux Ubuntu的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
有谁知道解决这个问题? 感谢
请安装'的libpq-dev':该文件是'/ usr/include目录/ postgresql/libpq-fe.h' http://packages.ubuntu.com/xenial-updates/amd64/libpq-dev/filelist –