2

Ao instalar o o mongo-hack no Ubuntu está sendo gerado o seguinte erro:

npm install -g mongo-hacker
|
[email protected] install /usr/lib/node_modules/mongo-hacker make install

cat config.js base.js hacks/aggregation.js hacks/api.js

hacks/auto_complete.js hacks/cmd_search.js hacks/color.js hacks/common.js hacks/count.js hacks/dbref.js hacks/find_and_modify.js hacks/helpers.js hacks/index_paranoia.js hacks/old_aggregation.js hacks/prompt.js hacks/show.js hacks/sh_status.js hacks/uuid.js hacks/verbose.js > mongo_hacker.js

INSTALLATION

Linking MongoHacker to .mongorc.js in your home directory: ln -sf "/usr/lib/node_modules/mongo-hacker/mongo_hacker.js" ~/.mongorc.js ln: failed to access ‘/root/.mongorc.js’: Permission denied make: *** [install] Error 1

npm ERR! [email protected] install: make install

npm ERR! Exit status 2

npm ERR!

npm ERR! Failed at the [email protected] install script.

npm ERR! This is most likely a problem with the mongo-hacker package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR! make install

npm ERR! You can get their info via:

npm ERR! npm owner ls mongo-hacker

npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.19.0-47-generic

npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "mongo-hacker"

npm ERR! cwd /mongo-hacker/mongo-hacker/hacks

npm ERR! node -v v0.10.37

npm ERR! npm -v 1.4.28

npm ERR! code ELIFECYCLE

[email protected] postuninstall /usr/lib/node_modules/mongo-hacker
make uninstall

rm -f ~/.mongorc.js rm: cannot remove ‘/root/.mongorc.js’: Permission denied

make: *** [uninstall] Error 1

npm WARN continuing anyway [email protected] postuninstall: make uninstall

npm WARN continuing anyway Exit status 2

npm ERR! not ok code 0

Já tentei como root e mesmo assim o erro continua.

1 Resposta 1

1

Passei pelo mesmo problema hoje.

Depois de tentar várias soluções, encontrei essa com a qual eu consegui resolver esse problema.

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

Se quiser consultar o link original : https://docs.npmjs.com/getting-started/fixing-npm-permissions

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .