赞
踩
https://raw.githubusercontent.com/Homebrew/install/master/install
看是否能打开,不能打开就是你网络有问题,fq。
把这个网页保存名为brew_install.rb的文件,保存的位置你随便,只要自己能找到。
终端输入
ruby brew_install.rb
安装完成后让你执行命令 配置到系统变量上面
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/liuan/.zprofile
执行完了以后。。当前窗口是可以的。。随便brew。但是环境变量里面是没有的
给brew安装环境变量
- echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.bash_profile
- source ~/.bash_profile
1.安装mpapis公钥。但是,正如安装页面所记录的,您可能需要gpg。Mac OS X不附带gpg,因此在安装公钥之前,您需要安装gpg。我用Homebrew安装了gpg :
brew install gnupg
2.安装完gpg之后,你可以安装mpapis公钥:
gpg --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
3.安装最新版本的Ruby的RVM
curl -sSL https://get.rvm.io | bash -s stable --ruby
上面第三部的命令。。你会发现你不行
更改hosts文件。
1.mac终端中输入: sudo vi /etc/hosts
2.然后加上下面的这些IP地址配置
- 52.74.223.119 github.com
- 192.30.253.119 gist.github.com
- 54.169.195.247 api.github.com
- 185.199.111.153 assets-cdn.github.com
- 151.101.76.133 raw.githubusercontent.com
- 151.101.108.133 user-images.githubusercontent.com
- 151.101.76.133 gist.githubusercontent.com
- 151.101.76.133 cloud.githubusercontent.com
- 151.101.76.133 camo.githubusercontent.com
- 151.101.76.133 avatars0.githubusercontent.com
- 151.101.76.133 avatars1.githubusercontent.com
- 151.101.76.133 avatars2.githubusercontent.com
- 151.101.76.133 avatars3.githubusercontent.com
- 151.101.76.133 avatars4.githubusercontent.com
- 151.101.76.133 avatars5.githubusercontent.com
- 151.101.76.133 avatars6.githubusercontent.com
- 151.101.76.133 avatars7.githubusercontent.com
- 151.101.76.133 avatars8.githubusercontent.com

然后再执行下就好了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。