安装 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