ubuntu 12.04 下使用 bower

安装 nodejs


不要通过 apt-get 安装,版本不对的话,很多 repo下载不了

使用源码安装

wget http://nodejs.org/dist/v0.10.32/node-v0.10.32.tar.gz
tar -zxvf ./node-v0.10.32.tar.gz
cd node-v0.10.32
./configure
make 
sudo make install

设置 registry,推荐 taobao的:

npm config set registry https://registry.npm.taobao.org/



使用 bower

sudo npm install bower -g

clone github出错:

bower install angular-strap --save
bower angular-strap#*       not-cached git://github.com/mgcrea/angular-strap.git#*
bower angular-strap#*          resolve git://github.com/mgcrea/angular-strap.git#*
bower angular-strap#*          ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/mgcrea/angular-strap.git", exit code of #128


Additional error details:
fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=Connection timed out


解决方法是:

git config --global url."https://github.com".insteadOf git://github.com



  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值