Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5952

Fix for npm global install on Ubuntu

$
0
0

I have a nodejs package that requires a global install. This one fails in a way that leads me to believe there might be a configuration problem in the the Ubuntu package npm. This happens every-time I setup an Ubuntu 14.04 machine.

sudo apt-get install npmnpm install -g lineman

The npm -g command will throw some access error naming the local lib and bin directories. Unlike some global installs, it is not an option to cheat and run the second command under sudo. So, the only fix I have found that will work is something like this:

sudo chgrp -R $(whoami) /usr/local/bin /usr/local/libsudo chmod -R g+rwx /usr/local/bin /usr/local/lib

The fix is fine for me, I'm the only user. But is this really the best way to do it? I don't want to document my fix for anyone else that might use it in an environment where this will not work or cause trouble.

Also, should I file a bug report with someone who packages npm for Ubuntu?


Viewing all articles
Browse latest Browse all 5952

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>