我目前正在解决一个快速的postgresql git子模块的问题。错误如下:
$ rake
[19:38:19]
checking for uuid/uuid.h in /usr/include/uuid,/usr/include/postgresql,/usr/local/include/postgresql,/opt/local/include,/opt/local/include/postgresql90,/opt/local/include/postgresql85,/opt/local/include/postgresql84,/sw/include... yes
checking for libpq-fe.h in /usr/include/postgresql,/usr/local/include/postgresql,/opt/local/include,/opt/local/include/postgresql90,/opt/local/include/postgresql85,/opt/local/include/postgresql84,/sw/include... no
checking for main() in -luuid... yes
checking for main() in -lpq... yes
creating Makefile
compiling adapter.c
compiling common.c
In file included from adapter.c:6:
In file included from ./adapter.h:7:
./common.h:11:10: fatal error: 'libpq-fe.h' file not found
#include <libpq-fe.h>
^
In file included from common.c:5:
./common.h:11:10: fatal error: 'libpq-fe.h' file not found
#include <libpq-fe.h>
^
1 error generated.
make: *** [common.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
make: *** [adapter.o] Error 1
rake aborted!
unable to compile postgres
/Users/Dan/Dropbox/My Documents/Programming/Mash/mash-ios/swift-db-postgres/Rakefile:33:in `block (2 levels) in <top (required)>'
/Users/Dan/Dropbox/My Documents/Programming/Mash/mash-ios/swift-db-postgres/Rakefile:32:in `chdir'
/Users/Dan/Dropbox/My Documents/Programming/Mash/mash-ios/swift-db-postgres/Rakefile:32:in `block in <top (required)>'
Tasks: TOP => default => test => compile
(See full trace by running task with --trace)
我已经检查过该文件确实存在于/usr/local/include/libpq-fe.h,并尝试将其包含在我的构建路径中,但错误仍然存在。卸载并重新安装postgres无效。我认为这可能与线上某处的符号链接有关,但不知道如何解决这个问题。谁能帮我吗?谢谢!