Mac安装卸载更新Homebrew
Mac安装卸载更新Homebrew
- Mac安装Homebrew
- 制作Homebrew安装脚本
- 修改Homebrew安装脚本权限
- 执行Homebrew安装脚本
- Mac卸载Homebrew
- 制作Homebrew卸载脚本
- 修改Homebrew卸载脚本权限
- 执行Homebrew卸载脚本
- Mac更新Homebrew
- 卸载Homebrew
- 安装Homebrew
- 更新Homebrew
Mac安装Homebrew
使用Homebrew官网命令去安装的伙伴们一定遇到过这样的问题,当你在Mac的terminal终端粘贴从Homebrew官网上复制的安装命令后,terminal输入如下
~ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
如何解决呢?
制作Homebrew安装脚本
打开链接:
https://raw.githubusercontent.com/Homebrew/install/master/install
若打不开网页,出现下图情况:
打开terminal终端输入
~ $ sudo vim /etc/hosts
并正确输入Mac的密码,打开vim后按 i进入编辑模式,新起一行输入199.232.96.133 raw.githubusercontent.com,然后按esc 并输入 :wq,如下图所示:
回车。
重新点击上面链接,网页如下图:
把网页内容Command + a全选,Command + c复制下来,打开terminal终端输入
~ $ vim brew_install
打开vim后,Command + v粘贴上去,然后按esc 并输入 :wq,如下图所示
然后回车,我们的Homebrew安装脚本brew_install就做好了。
修改Homebrew安装脚本权限
修改Homebrew安装脚本brew_install文件权限,terminal终端输入如下命令:
~ $ chmod 755 brew_install
回车。
执行Homebrew安装脚本
执行Homebrew安装脚本brew_install,terminal终端输入如下命令:
~ $ ./brew_install
回车。若terminal终端输入如下:
~ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
打开一个新终端Command + n,多次尝试输入如下指令
~ $ ./brew_install
直到terminal输出如下:
Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
Bash. Please migrate to the following command:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"Password:
正确输入你Mac密码,回车,输出如下:
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made writable by user only:
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
==> The following new directories will be created:
/usr/local/include
/usr/local/lib
/usr/local/sbin
/usr/local/opt
/usr/local/var/homebrew/linked
/usr/local/Cellar
/usr/local/Caskroom
/usr/local/FrameworksPress RETURN to continue or any other key to abort
回车。等待。。。当你terminal陆续输入如下时:
==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /bin/mkdir -p /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/opt /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/opt /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /usr/sbin/chown gsm /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/opt /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/opt /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /usr/sbin/chown -R gsm:admin /usr/local/Homebrew
==> /usr/bin/sudo /bin/mkdir -p /Users/gsm/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/gsm/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown -R gsm /Users/gsm/Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 19 (delta 11), reused 16 (delta 11), pack-reused 0
Unpacking objects: 100% (19/19), done.
From https://github.com/Homebrew/brew3b8fa5a7a..d37c8c99f master -> origin/master
HEAD is now at d37c8c99f Merge pull request #10482 from MikeMcQuaid/tests-bootsnap==> Installation successful!==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:https://docs.brew.sh/Analytics
No analytics data has been sent yet (or will be during this `install` run).==> Homebrew is run entirely by unpaid volunteers. Please consider donating:https://github.com/Homebrew/brew#donations==> Next steps:
- Run `brew help` to get started
- Further documentation: https://docs.brew.sh
恭喜你安装成功!
Mac卸载Homebrew
制作Homebrew卸载脚本
打开链接:
https://raw.githubusercontent.com/Homebrew/install/master/uninstall
若打不开网页,出现下图情况:
打开terminal终端输入
~ $ sudo vim /etc/hosts
并正确输入Mac的密码,打开vim后按 i进入编辑模式,新起一行输入199.232.96.133 raw.githubusercontent.com,然后按esc 并输入 :wq,如下图所示:
回车。
重新点击上面链接,网页如下图:
把网页内容Command + a全选,Command + c复制下来,打开terminal终端输入
~ $ vim brew_uninstall
打开vim后,Command + v粘贴上去,然后按esc 并输入 :wq,如下图所示
然后回车,我们的Homebrew卸载脚本brew_uninstall就做好了。
修改Homebrew卸载脚本权限
修改Homebrew安装脚本brew_install文件权限,terminal终端输入如下命令:
~ $ chmod 755 brew_uninstall
回车。
执行Homebrew卸载脚本
执行Homebrew卸载脚本brew_uninstall,terminal终端输入如下命令:
~ $ ./brew_uninstall
回车。若terminal终端输入如下:
~ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
打开一个新终端Command + n,多次尝试输入如下指令
~ $ ./brew_install
直到terminal输出如下:
Warning: The Ruby Homebrew uninstaller is now deprecated and has been rewritten in
Bash. Please migrate to the following command:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"Warning: This script will remove:
/Users/gsm/Library/Caches/Homebrew/
/usr/local/Caskroom/
/usr/local/Cellar/
/usr/local/bin/brew -> /usr/local/bin/brew
Are you sure you want to uninstall Homebrew? This will remove your installed packages! [y/N]
输入 y,回车,输出如下:
==> Removing Homebrew installation...
Warning: Failed to delete /usr/local/Caskroom
rm: /usr/local/Caskroom: Permission denied
Warning: Failed to delete /usr/local/Cellar
rm: /usr/local/Cellar: Permission denied
==> Removing empty directories...
Password:
正确输入你Mac密码,回车,当你terminal陆续输入如下时:
==> /usr/bin/sudo /usr/bin/find /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var /usr/local/Caskroom /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks -name .DS_Store -delete
==> /usr/bin/sudo /usr/bin/find /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var /usr/local/Caskroom /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks -depth -type d -empty -exec rmdir {} ;
==> Homebrew uninstalled!
The following possible Homebrew files were not deleted:
/usr/local/Homebrew/
/usr/local/bin/
/usr/local/etc/
/usr/local/share/
/usr/local/var/
You may wish to remove them yourself.
恭喜你卸载成功!
Mac更新Homebrew
你可能会遇到这种情况,当你在terminal中输入命令 brew install XXX安装服务时,总是有如下输出:
Updating Homebrew...
运气好可能更新成功,运气不好就各种报错,这时该怎么办呢?答案就是根据我的安装教程重新卸载并安装Homebrew。
卸载Homebrew
步骤如上,不赘述。
安装Homebrew
步骤如上,不赘述。
更新Homebrew
terminal输入如下命令:
~ $ brew update
若输出如下
Already up-to-date.
恭喜你Homebrew已经是最新的了,以后再使用brew install XXX 不会再弹出可恶的 Updating Homebrew… 了。
如果文章对你有所帮助记得帮忙点赞分享哟!
Mac安装卸载更新Homebrew相关推荐
- 15个Linux Yum命令实例--安装/卸载/更新
在linux环境中, 安装, 卸载更新包是一个极为常见的操作.大部分的linux环境都提供了包的管理工具, 例如:apt-get, dpkg, rpm, yum等等. 一些Linux环境中,yum是默 ...
- mac安装软件管家homebrew
http://www.iwangzheng.com/ 1.简介 众所周知,Mac的操作系统是基于Unix的,在这个系统上大家可以安装一些专门为mac定制开发的软件.这就带来了一个问题,手工编译每个软件 ...
- 解决 mac安装或者更新第三方包安装不上的问题 mac OSX pip OSError: [Errno 1] Operation not permitted
(1) 写在前面 在安装机器学习python包时,提示Macbook里面的Python库有点旧,就用pip更新一下. $ sudo pip install pandas $ pip install - ...
- mac安装卸载nvm
安装NVM 说明:我刚开始用的是github上的安装方法,但是由于是国外的,所以比较慢,地址:https://github.com/creationix/nvm 所以最终用的gitee: Gitee ...
- Ubuntu apt安装/卸载软件和设置软件源
apt是Advanced Packaging Tool,是Linux下的一款安装包管理工具 可以在终端中方便的安装/卸载/更新软件包 安装软件 sudo apt install 软件包 卸载软件 su ...
- Mac安装Redis,原来就是这么简单
Mac安装Redis 使用Homebrew安装Redis 1.没有安装Homebrew,首先安装npm国内的吧,快一些. 打开终端输入以下命令: /bin/zsh -c "$(curl -f ...
- Mac安装Homebrew的正确姿势
Homebrew 是什么 Homebrew是 mac的包管理器,仅需执行相应的命令,就能下载安装需要的软件包,可以省掉自己去下载.解压.拖拽(安装)等繁琐的步骤. 比如安装服务器 nginx,打开终端 ...
- Mac-工具-Homebrew快速安装/卸载/使用
欢迎使用Markdown编辑器 提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 Mac-工具-Homebrew教程 前言 一.安装 1.安装前置 2.安装Homebrew 3.卸载H ...
- Mac 安装软件包管理工具Homebrew
Mac安装brew 软件包管理工具Homebrew Homebrew安装 Homebrew基本命令 Homebrew是一款Mac OS下的软件包管理工具,具备安装.卸载.更新.查看.搜索等很多实用功能 ...
最新文章
- usaco frame up(所有拓扑排序的输出)
- 用户接口设计的20个原则
- python oracle数据库操作_Python连接oracle数据库的基本操作
- springcloud(一)-初识
- Linux Unix C 中的curses库——curses.h
- GitHub:除非真正需要,否则我们不会删除您的任何内容
- java线程池(ThreadPool)
- 第1节 连通性强连通、割点和桥 例题
- 手机屏坏了怎么把里面存东西取出来_手机又卡了,到底是运行不够还是存储容量不足?1分钟搞懂...
- 计算机代码图表,微信小程序图表插件(wx-charts)实例代码
- Jmeter-JDBC Request
- java对象的我可变属性,不可变对象的所有属性都必须是最终的吗?
- MySQL备份与恢复-innobackupex
- 画图软件Microsoft visio下载安装及使用
- 弘辽科技:限制店铺流量上涨的七大原因
- Git 之 多人协同开发工作流
- 谷歌打开后开始页面被hao123篡改
- 如何看待 12 月 26 日发布的华为云 WeLink 企业智能工作平台?能对标得过企业微信和钉钉吗?
- 2017 移动端 iOS 年终工作总结-纯干货请自备酒水
- 次世代游戏建模师一个月的工资有多少?