我已经安装了postgresql开发包,我把它放在C:/ pgsql96中(在bin目录下我有包,比如pg_config,我还添加了环境变量的路径。现在我要安装Multicorn(一个postgresql)我在C:/ Multicorn中克隆了Multicorn的git存储库,当我想运行make&& make install命令时,我收到以下错误:
make: pg_config: Command not found
make: pythonpython:-config: Command not found
expr: syntax error
expr: syntax error
Python version is python:
./preflight-check.sh
which: no pg_config in (/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
No pg_config found in your path.
Please check if you installed the PostgreSQL development packages.
make: *** [Makefile:28: preflight-check] Error 1
我在我的系统中安装了python,因为我可以从命令提示符访问它(我运行python --version,我看到我安装了它)但是在MinGW bash我运行make&& make install,没有安装python。 任何人都知道如何解决这些问题:
1)pg_config不在我的路径中,虽然我将C:\ pgsql96 \ bin添加到我的系统变量中(是否应该将其添加到用户变量而不是系统变量?我也尝试将它添加到两个环境变量中!!)但命令:
which pg_config
给我回复:
no pg_config in (/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
2-我可以从命令提示符访问python模块,但我无法从mingw bash访问它们,我需要使用mingw bash才能运行make&& make install命令。你能解释一下我什么时候应该使用命令提示符,何时应该使用MinGW,以及这两者之间是否应该同步?
更新1:
对于第一个找不到pg_config的问题,我添加了mingw / bin目录的路径。但是,我有另一个关于python.h
的问题:
make: pythonpython:-config: Command not found
Python version is python:
x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -I. -I./ -IC:/pgsql96/include/server -IC:/pgsql96/include/internal -I/c/Builds/postgresql/source/src/include/port/win32 -DEXEC_BACKEND -IC:/pgsql96/include/server/port/win32 -c -o src/errors.o src/errors.c
In file included from src/errors.c:15:0:
src/multicorn.h:1:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
make: *** [<builtin>: src/errors.o] Error 1
更新2:
我在配置过程中添加了Python路径,结果是:ANOTHER ERROR:
$ make && make install
Python version is 2.7
[ -d sql ] || mkdir sql
[ -d src ] || mkdir src
touch directories.stamp
x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -I/usr/include/python2.7 -I/usr/include/python2.7 -I. -I./ -IC:/pgsql96/include/server -IC:/pgsql96/include/internal -I/c/Builds/postgresql/source/src/include/port/win32 -DEXEC_BACKEND -IC:/pgsql96/include/server/port/win32 -c -o src/errors.o src/errors.c
make: *** [<builtin>: src/errors.o] Error 1
有什么想法吗?
答案 0 :(得分:0)
尝试
PATH="/c/pgsql96/bin:$PATH" make