user "root" does not have permission to access the dev dir "*/.node-gyp/0.10.37"

安装mosca的时候报了以下错误:

/usr/bin/bunyan -> /usr/lib/node_modules/bunyan/bin/bunyan
gyp WARN EACCES user "root" does not have permission to access the dev dir "*/.node-gyp/0.10.37"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/mosca/node_modules/zmq/.node-gyp"

刚开始尝试了加入:--unsafe-perm ,来屏蔽这些提示。但是总感觉不对。

后来细想了下感觉想是ubuntu没有对应的包导致的,所以查了相关资料,发现确实有个包,安装后,就完事OK了。

命令如下: sudo apt-get install node-gyp

猜你喜欢

转载自hongtoushizi.iteye.com/blog/2200327
今日推荐