Error installing Mongo-hack on Ubuntu 14.04

Asked

Viewed 501 times

2

When installing Mongo-hack on Ubuntu the following error is being generated:

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

I have tried as root and still the error continues.

1 answer

1

I went through the same problem today.

After trying several solutions, I found the one with which I was able to solve this problem.

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

If you want to consult the original link : https://docs.npmjs.com/getting-started/fixing-npm-permissions

Browser other questions tagged

You are not signed in. Login or sign up in order to post.