基于nodejs的meteor框架安装

时间:15-12-04 栏目:技术 作者:liva 评论:1 点击: 4,605 次

wzj@mylab:~/web/nodejs/meteor$ sudo curl https://install.meteor.com | /bin/sh
[sudo] password for wzj:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6119    0  6119    0     0    176      0 --:--:--  0:00:34 --:--:--  1799
Downloading Meteor distribution

curl: (35) Unknown SSL protocol error in connection to d3sqy0vbqsdhku.cloudfront.net:443

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Installation failed.

我在安装这个框架的时候总是提示上面的错误,后来感觉是网络问题,他们用的是cloudfront的cdn,这个也太差了,看来只能用代理下载了,首先把脚本下载下来,用下面的命令:

curl https://install.meteor.com > a.sh

chomd 777 a.sh

找到大概121行位置:

117 INSTALL_TMPDIR="$HOME/.meteor-install-tmp"      
118 rm -rf "$INSTALL_TMPDIR"                        
119 mkdir "$INSTALL_TMPDIR"                         
120 echo "Downloading Meteor distribution"          
121 curl --progress-bar --fail -x 10.240.177.217:1080 "$TARBALL_URL" | tar -xzf - -C "$INSTALL_TMPDIR" -o                                                                                                                                  
122 # bomb out if it didn't work, eg no net         

将红色的修改为你的 代理服务器地址:端口,这里我用了一个香港的代理,顺利安装成功:

wzj@mylab:~/web/nodejs/meteor$ sh a.bat
Downloading Meteor distribution
######################################################################## 100.0%

Meteor 1.2.1 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.
This may prompt for your password.

To get started fast:

  $ meteor create ~/my_cool_app
  $ cd ~/my_cool_app
  $ meteor

Or see the docs at:

  docs.meteor.com

声明: 本文由( liva )原创编译,转载请保留链接: 基于nodejs的meteor框架安装

基于nodejs的meteor框架安装:目前有1 条留言

  1. 沙发
    dadfsdf China Google Chrome Mac OS :

    chomd 777 a.sh
    请问这个命令是什么,命令端报错了呢

    2016-05-24 下午 10:07 [回复]

发表评论


购物推荐

赞助商

© 2013 enjoydiy.com. Design by zijiao. 58 queries in 0.229 seconds, using 21.35MB memory