2015-10-16 96 views
1

我试图在Ubuntu上安装均值CLI,使用以下命令:错误而安装均CLI

sudo npm install -g mean-cli

不过。当我尝试运行

[email protected] preinstall /home/marcelo/projects/node_modules/mean-cli 
node ./scripts/preinstall 

npm WARN deprecated [email protected]: Before v3.0.0, errors in fs.writeFile would not be propagated 

> [email protected] postinstall /home/marcelo/projects/node_modules/mean-cli/node_modules/mean-health 
> node ./postinstall.js 


> [email protected] install /home/marcelo/projects/node_modules/mean-cli/node_modules/mongoose/node_modules/bson/node_modules/bson-ext 
> (node-gyp rebuild 2> builderror.log) || (exit 0) 

make: Entering directory '/home/marcelo/projects/node_modules/mean-cli/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build' 
    CXX(target) Release/obj.target/bson/ext/bson.o 
    SOLINK_MODULE(target) Release/obj.target/bson.node 
    COPY Release/bson.node 
make: Leaving directory '/home/marcelo/projects/node_modules/mean-cli/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build' 

> [email protected] install /home/marcelo/projects/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos 
> (node-gyp rebuild) || (exit 0) 

make: Entering directory '/home/marcelo/projects/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build' 
    CXX(target) Release/obj.target/kerberos/lib/kerberos.o 
    CXX(target) Release/obj.target/kerberos/lib/worker.o 
    CC(target) Release/obj.target/kerberos/lib/kerberosgss.o 
../lib/kerberosgss.c:36:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] 
#pragma clang diagnostic push^
../lib/kerberosgss.c:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] 
    #pragma clang diagnostic ignored "-Wdeprecated-declarations" 
^ 
../lib/kerberosgss.c: In function ‘authenticate_gss_client_wrap’: 
../lib/kerberosgss.c:362:19: warning: variable ‘server_conf_flags’ set but not used [-Wunused-but-set-variable] 
    char buf[4096], server_conf_flags; 
       ^
../lib/kerberosgss.c: At top level: 
../lib/kerberosgss.c:930:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] 
#pragma clang diagnostic pop 
^ 
    CC(target) Release/obj.target/kerberos/lib/base64.o 
    CXX(target) Release/obj.target/kerberos/lib/kerberos_context.o 
    SOLINK_MODULE(target) Release/obj.target/kerberos.node 
/usr/bin/ld: cannot find -lkrb5 
/usr/bin/ld: cannot find -lgssapi_krb5 
collect2: error: ld returned 1 exit status 
kerberos.target.mk:130: recipe for target 'Release/obj.target/kerberos.node' failed 
make: *** [Release/obj.target/kerberos.node] Error 1 
make: Leaving directory '/home/marcelo/projects/node_modules/mean-cli/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:269:23) 
gyp ERR! stack  at ChildProcess.emit (events.js:110:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:1074:12) 
gyp ERR! System Linux 3.19.0-30-generic 
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /home/marcelo/projects/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos 
gyp ERR! node -v v0.12.7 
gyp ERR! node-gyp -v v2.0.1 
gyp ERR! not ok 
[email protected] ../node_modules/mean-cli 
├── [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], [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], [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], [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]) 

然后:

mean init yourNewApp

它说的命令“意味着”不存在,因为上面的错误回报的可能,我得到这个。有人能帮我吗?我是新手,意味着cli。

回答

1

NPM更新-g NPM

NPM更新-g咕噜-CLI

NPM更新-g凉亭

这可能是你的包需要更新的是在我的情况

问题

我也忘了我之前做过的一件事

sudo apt-get install libkrb5-dev

这将安装kerbores dev文件,这是您的脚本失败的地方