【问题标题】:Error when using $ sudo npm install -g mean-cli使用 $ sudo npm install -g mean-cli 时出错
【发布时间】:2016-03-02 16:03:07
【问题描述】:

我是新手,我在ubuntu上安装了MEAN.JS Stack, 但是当我使用

$ sudo npm install -g mean-cli

我明白了

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.13.0-80-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 
npm ERR! Error: 404 Not Found
npm ERR!     at WriteStream.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/fetch.js:58:12)
npm ERR!     at WriteStream.emit (events.js:117:20)
npm ERR!     at evalmachine.<anonymous>:1609:14
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:102:5
npm ERR!     at Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.13.0-80-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "mean-cli"
npm ERR! cwd /home/travis
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! not ok code 0

我该如何解决这个问题?谢谢。

【问题讨论】:

    标签: node.js ubuntu meanjs


    【解决方案1】:

    prolem 是 nodejs 和 npm 的版本,我是这样的,只需更新 node.js 和 npm。

    【讨论】:

      【解决方案2】:

      请确保您的互联网连接已建立。此错误是由于网络连接失败而发生的

      【讨论】:

      • 你升级你的ubantu了吗?当前版本是什么
      • 你的意思是ubuntu,我用的是ubuntu 14.04 LTS
      • 尝试升级你的ubantu?
      • 谢谢,我确实解决了。
      • 出了什么问题?
      猜你喜欢
      • 2020-11-01
      • 2013-05-20
      • 2013-12-14
      • 2013-09-15
      • 2020-12-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多