【问题标题】:Unable to install meteorite on Ubuntu VM无法在 Ubuntu 虚拟机上安装陨石
【发布时间】:2014-01-30 19:19:05
【问题描述】:

我在 Oracle VM VirtualBox 4.3.6 中运行 Win7 并安装 Ubuntu 12.04.3。

我做的第一件事是尝试安装陨石,但得到以下错误:

npm install -g meteorite
npm http GET https://registry.npmjs.org/meteorite

npm ERR! Error: failed to fetch from registry: meteorite
npm ERR!     at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR!     at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR!     at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR!     at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR!     at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.onIncoming (http.js:1261:11)
npm ERR!     at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR!     <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR!     reportbug --attach /home/rune/npm-debug.log npm
npm ERR! 
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "meteorite"
npm ERR! cwd /home/rune
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: meteorite
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/rune/npm-debug.log
npm not ok

【问题讨论】:

    标签: ubuntu meteor virtualbox meteorite


    【解决方案1】:

    这是我的安装步骤

    1:更新和升级您的 Ubuntu 根据您的图像的最新程度,这可能需要一段时间。

    sudo apt-get update &amp;&amp; sudo apt-get upgrade

    2:安装 curl

    sudo apt-get install curl

    3:安装节点 http://lucidservices.com/2013/09/17/install-node-on-ubuntu/

    4:安装流星

    curl https://install.meteor.com | sh

    5:安装陨石

    sudo -H npm install -g meteorite

    【讨论】:

    • 太棒了!非常非常感谢你。有人应该为此制作虚拟机快照或为所有这些创建脚本:-)
    • 这对我不起作用。下面亚伦的解决方案对我有用,应该是公认的解决方案。
    【解决方案2】:

    这发生在我身上很多次了——这个帖子中的解决方案对我有用——Install NodeJS on Ubuntu 12.10

    【讨论】:

      【解决方案3】:

      显然,Meteor 安装了自己的节点和 npm,您不应该将它们与系统或其他节点或 npm 安装混合。

      我为此搜索了很长时间,并创建/销毁了许多 EC2 实例,直到找到解决方案。

      curl https://install.meteor.com | /bin/sh 之后只需导出路径,这样你的 shell 就可以找到 Meteor 的 npm:

      export PATH=~/.meteor/tools/latest/bin:$PATH.bash-profile 做这件事。

      这让我可以轻松安装陨石,无需 sudo: npm install -g meteorite

      我是从https://github.com/oortcloud/meteorite/issues/203那里学到的

      【讨论】:

      • 这绝对是做事的方式。非常感谢。
      • 不要浪费时间升级您的系统。这个方法真的很有效,解释了流星的内部结构。
      【解决方案4】:

      请在此处查看答案:error when type 'sudo npm install -g meteorite'

      您的 npm 缓存需要清理。

      rm -rf ~/tmp
      sudo npm cache clear
      sudo npm install -g meteorite
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-05-03
        相关资源
        最近更新 更多