码迷,mamicode.com
首页 > 系统相关 > 详细

Mac安装homebrew安装到指定目录

时间:2018-09-08 14:09:15      阅读:1314      评论:0      收藏:0      [点我收藏+]

标签:安装   tps   http   配置   bin   tarball   ruby   --   content   

第一种直接安装在/usr/local目录下

mac 打开终端输入

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

第二种安装到/usr/local/homebrew

mac 打开终端输入

mkdir homebrew && curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C homebrew

然后在配置

终端输入cd ~

终端输入open .bash_profile

在里面加入

homebrew=/usr/local/homebrew/bin:/usr/local/homebrew/sbin
export PATH=$homebrew:$PATH

保存

 

终端输入source .bash_profile

最后更新一下

终端输入

 

brew update

Mac安装homebrew安装到指定目录

标签:安装   tps   http   配置   bin   tarball   ruby   --   content   

原文地址:https://www.cnblogs.com/cl2Blogs/p/9608933.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!