Marcelo Borges
Marcelo Borges

Reputation: 138

Error while installing MEAN-CLI

I'm trying to install MEAN-CLI on Ubuntu, with the following command:

sudo npm install -g mean-cli

However. I'm getting this:

[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])

Then when I try to run:

mean init yourNewApp

It says the command 'mean' does not exist, probably because of the erros above. Can someone help me? I'm new to mean-cli.

Upvotes: 1

Views: 609

Answers (1)

andrew.butkus
andrew.butkus

Reputation: 777

npm update -g npm

npm update -g grunt-cli

npm update -g bower

It may be your packages need updating as was the problem in my case

also i forgot a step i did before this

sudo apt-get install libkrb5-dev

this installs the kerbores dev files which is where your script is failing

Upvotes: 1

Related Questions