mac OS简单实用的包管理器Homebrew,真的非常好用

本文涉及的产品
服务治理 MSE Sentinel/OpenSergo,Agent数量 不受限
简介: 今天安装zookeeper时使用的是brew方式来安装,才深深的体会到brew的厉害之处,闲话少叙,进入正题。

前言

今天安装zookeeper时使用的是brew方式来安装,才深深的体会到brew的厉害之处,闲话少叙,进入正题。

Homebrew的使用

1. 安装Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/mast

在1中指令回车之后,会提示Press RETURN to continue or any other key to abort (回车继续或者按其他键终止),这是直接回车进入“Downloading and installing Homebrew…”,


如果网络不好的话可能会提示“fatal: unable to access ‘https://github.com/Homebrew/brew/’: SSLRead() return error -9806…等”,没关系重新输入1的指令更新。

用如下命令下载安装msf时,提示curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

解决办法:

打开 https://www.ipaddress.com/ 输入访问不了的域名,获得对应的IP。

使用vim /etc/hosts命令打开不能访问的机器的hosts文件,添加如下内容:

199.232.68.133 raw.githubusercontent.com
199.232.68.133 user-images.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com


注:上面内容中199.232.68.133是raw.githubusercontent.com所在的服务器IP(通过 https://www.ipaddress.com/ 获知)。

保存该文件,再使用即可正常访问。


正常安装完成之后会有如下提示:

HEAD is now at 2b6f47714 Merge pull request #4116 from commitay/zap-force
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/maerfeifei/Library/Caches/Homeb
==> Deleting /Library/Caches/Homebrew...
Already up-to-date.
==> Installation successful!
==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
 https://docs.brew.sh/Analytics.html
==> Next steps:
- Run `brew help` to get started
- Further documentation: 
   https://docs.brew.sh

2. brew 常用命令(SoftwareName是你需要处理的软件的软件名)

查看软件最新版本,brew info SoftwareName例如

brew info zookeeper


安装软件,brew install SoftwareName例如

brew install zookeeper

卸载软件:rew remove SoftwareName例如

brew remove zookeeper

查看通过brew安装的所有软件

brew list

查看某个软件的安装路径

brew list 软件名
相关实践学习
基于MSE实现微服务的全链路灰度
通过本场景的实验操作,您将了解并实现在线业务的微服务全链路灰度能力。
相关文章
|
1月前
|
开发工具 git iOS开发
Mac 安装软件包管理工具Homebrew
Mac 安装软件包管理工具Homebrew
|
6月前
|
开发工具 数据安全/隐私保护 git
百度搜索:蓝易云【Mac 安装homebrew Mac安装Git教程。】
现在,您已成功在Mac上安装了Homebrew和Git。您可以使用Homebrew安装其他软件包,并使用Git进行版本控制和代码管理。 希望这些信息对您有所帮助!如果您有任何其他问题,请随时提问。
123 0
|
4月前
|
iOS开发 MacOS
MAC OS更新系统后IDEA中的SVN报错无法使用
MAC OS更新系统后IDEA中的SVN报错无法使用
mac安装homebrew失败:Failed to connect to raw.githubusercontent.com port 443: Connection refused
mac安装homebrew失败:Failed to connect to raw.githubusercontent.com port 443: Connection refused
|
5月前
Mac解决Updating Homebrew卡顿
Mac解决Updating Homebrew卡顿
51 0
|
7月前
|
前端开发 安全 Go
在Mac OS X上运行Go语言的GUI程序
在Mac OS X上运行Go语言的GUI程序
199 3
|
8月前
|
开发工具 iOS开发 git
Mac Homebrew 安装与卸载
Mac Homebrew 安装与卸载
2843 0
|
9月前
|
Linux Shell
Mac 安装Homebrew方案
Mac 安装Homebrew方案
|
10月前
|
NoSQL Redis 数据库
Python 数据库开发实战-Mac系统下通过homebrew安装Redis数据库
此文章的前置条件是 “Mac系统已安装过Homebrew”,如果未安装,可访问 “Mac 安装 homebrew 详细教程” 一文,详细介绍Homebrew的用法。利用 “Homebrew” 对 “Redis” 进行安装管理,那是一个方便啊。
|
10天前
|
监控 Unix Linux
Linux操作系统调优相关工具(四)查看Network运行状态 和系统整体运行状态
Linux操作系统调优相关工具(四)查看Network运行状态 和系统整体运行状态
26 0