2015-10-03 27 views
16

Ubuntu 14,04NPM cài đặt mongoose gây đầy tớ trường trung học và Kerberos lỗi (GSSAPI/gssapi.h tập tin không tìm thấy)

nodejs phiên bản là v4.1.1 cài đặt với các lệnh:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - 
sudo apt-get install -y nodejs 

mongodb cài đặt qua mongodb docs tutorial

Tiếp theo, tôi cố gắng cài đặt mongoose bằng cách làm

sudo npm install mongoose 

tôi nhận được lỗi sau:

> [email protected] install /root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos 
> (node-gyp rebuild) || (exit 0) 

gyp ERR! build error 
gyp ERR! stack Error: not found: make 
gyp ERR! stack  at F (/usr/lib/node_modules/npm/node_modules/which/which.js:73:28) 
gyp ERR! stack  at E (/usr/lib/node_modules/npm/node_modules/which/which.js:76:29) 
gyp ERR! stack  at /usr/lib/node_modules/npm/node_modules/which/which.js:84:16 
gyp ERR! stack  at FSReqWrap.oncomplete (fs.js:82:15) 
gyp ERR! System Linux 3.13.0-57-generic 
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos 
gyp ERR! node -v v4.1.1 
gyp ERR! node-gyp -v v3.0.3 
gyp ERR! not ok 
[email protected] node_modules/mongoose 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected]) 

Tôi đã cố gắng cài đặt làm qua

sudo apt-get install make 

Cố gắng cài đặt mongoose qua NPM lại , đã nhận được lỗi sau:

> [email protected] install /root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos 
> (node-gyp rebuild) || (exit 0) 

make: Entering directory `/root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build' 
    CXX(target) Release/obj.target/kerberos/lib/kerberos.o 
make: g++: Command not found 
make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 127 
make: Leaving directory `/root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build' 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Linux 3.13.0-57-generic 
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos 
gyp ERR! node -v v4.1.1 
gyp ERR! node-gyp -v v3.0.3 
gyp ERR! not ok 
[email protected] node_modules/mongoose 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected]) 

tôi đã cố gắng cài đặt g ++ qua

sudo apt-get install g++ 

cố gắng cài đặt mongoose một lần nữa, nhận lỗi:

> [email protected] install /root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos 
> (node-gyp rebuild) || (exit 0) 

make: Entering directory `/root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build' 
    CXX(target) Release/obj.target/kerberos/lib/kerberos.o 
In file included from ../lib/kerberos.cc:1:0: 
../lib/kerberos.h:5:27: fatal error: gssapi/gssapi.h: No such file or directory 
#include <gssapi/gssapi.h> 
         ^
compilation terminated. 
make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1 
make: Leaving directory `/root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build' 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Linux 3.13.0-57-generic 
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos 
gyp ERR! node -v v4.1.1 
gyp ERR! node-gyp -v v3.0.3 
gyp ERR! not ok 
[email protected] node_modules/mongoose 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected]) 

Bất kỳ ý tưởng như những gì vấn đề của tôi (s) được?

Trả lời

56

Hãy thử cài đặt các gói phát triển Kerberos:

apt-get install libkrb5-dev 
+6

Hoặc cho Red Hat như 'yum install krb5-devel' – Skarllot

+1

Làm việc cho tôi trên GCE. Cảm ơn! – Cyph

3

Giải pháp cho Dockerfile không bỏ lỡ apt-get update

RUN apt-get update 
RUN apt-get install -y libkrb5-dev 

Bởi vì bạn có một lỗi.

E: Package 'libkrb5-dev' has no installation candidate 
Các vấn đề liên quan