2012-11-18 2 views
4

를 설치할 때 나는 페이지 노드 모듈을 설치하고 싶습니다이 내가있어 문제입니다 :오류 페이지 노드 모듈

Exception: Call to 'pg_config --libdir' returned exit status 1. while trying to load binding.gyp 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure 
.js:350:16) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:99:17) 
gyp ERR! stack  at Process._handle.onexit (child_process.js:678:10) 
gyp ERR! System Windows_NT 6.1.7600 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild 
" 
gyp ERR! cwd C:\wamp\www\googleMap\node_modules\pg 
gyp ERR! node -v v0.8.14 
gyp ERR! node-gyp -v v0.7.1 
gyp ERR! not ok 
[email protected] node_modules\pg 
└── [email protected] 

이 사람이 나를 도울 수 있을까요?

+1

글쎄,'pg_config --libdir'은 명령 행에서 실행될 때 무엇을 리턴합니까? PostgreSQL 버전? 소프트웨어를 컴파일하려고하기 때문에 Microsoft Windows SDK가 설치되어 있습니까? (node.js 용 Pg 모듈의 바이너리가 없으므로 Windows에서이를 피할 수 있습니까?) –

답변

1

pg_config은 PostgreSQL 패키지의 실행 파일입니다. 노드 pg 모듈을 설치하기 전에 이것이 먼저 설치되었는지 확인해야합니다.

이유는 pg 모듈이 실제로 pgsql 도구와 C/C++ 코드를 사용하여 드라이버를 컴파일하므로 노드 모듈이 node-gyp을 사용하는 이유입니다.

은 자세한 내용은이 기사를 읽기 : 당신은 pg_config.exe이 목록에 나타납니다 http://www.postgresql.org/docs/8.2/static/install-win32.html

. 또한 pg 노드 모듈을 다시 설치하려고 시도 할 때 pg_config.exePATH에 있는지 확인하십시오. 실행중인 동일한 작업 디렉토리에서 pg_config.exe을 실행하여 확인하거나 수행 할 수 있습니다. npm install <module>

-1

Windows 8 64Bits; 다음과 같이 환경 변수를 구성합니다

My Computer을 마우스 오른쪽 단추로 클릭 한 다음 고급 탭을 클릭 Properties을 클릭 환경 변수을 클릭합니다.

%PATH% 변수를 편집하십시오. 그리고 추가하십시오 c:\Program Files\PostgreSQL\9.3\bin