当前位置:网站首页>homwbrew安装、常用命令以及安装路径
homwbrew安装、常用命令以及安装路径
2022-04-23 15:57:00 【aserendipper】
一、安装
1、homebrew是什么?
Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷。
2、安装homebrew
homebrew官网中介绍安装homebrew只需一句脚本。
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
通过终端输入此命令后,会出现连接拒绝。
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
解决办法一
- 修改hosts文件,添加以下内容到hosts中末尾。
sudo vi /etc/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
- 重新输入安装脚本,泡一杯奶茶,静等下载(时间比较长)。

解决办法二
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
- 上面脚本中使用了中科大镜像来加速访问。
如果命令执行卡在下面信息:
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
Control + c中断脚本执行并运行以下命令:
cd "$(brew --repo)/Library/Taps/"
mkdir homebrew && cd homebrew
git clone git://mirrors.ustc.edu.cn/homebrew-core.git
成功执行之后继续执行安装命令:
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
3、输入命令brew -v验证是否安装成功。
二、常用命令
以下命令以对git操作为例
brew -v 查看homebrew安装版本
brew --help 简洁命令帮助
man brew 完整命令帮助
brew search git 搜索软件包
brew install git 安装软件包
brew uninstall git 卸载安装包
brew list 显示已安装的所有软件包
brew list git 查看安装软件包的安装地址
brew pin git 锁定不想更新的软件包
brew unpin git 取消锁定不想更新的软件包
brew outdated 查看已安装的哪些软件包需要更新以及更新情况
brew update 同步远程最新更新情况,对本机已经安装并有更新的软件用*标明
brew upgrade git 更新单个软件包
brew info git 查看软件包信息
brew home git 访问软件包的官方网站
brew cleanup -n 查看可清理的旧版本包,不执行实际操作
brew cleanup 清理所有已安装软件包的历史版本
brew cleanup git 清理单个已安装软件包的历史版本
三、homebrew安装路径
/usr/local/Cellar 所有homebrew安装的程序,都以[程序名/版本号]存放于本目录下
/usr/local/bin 用于存放所有安装程序的启动链接(相当于快捷方式)
/usr/local/etc 安装程序的配置文件默认存放路径
/usr/local/opt homebrew下载软件包存放路径
/usr/local/Homebrew homebrew自身存放文件夹
版权声明
本文为[aserendipper]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_39234967/article/details/117674967
边栏推荐
- Neodynamic Barcode Professional for WPF V11.0
- Config learning notes component
- 多级缓存使用
- 糖尿病眼底病变综述概要记录
- API IX JWT auth plug-in has an error. Risk announcement of information disclosure in response (cve-2022-29266)
- Read the meaning of serial port and various level signals
- GRBL学习(一)
- s16. One click installation of containerd script based on image warehouse
- Leetcode-374 guess the size of the number
- Ice -- source code analysis
猜你喜欢

Read the meaning of serial port and various level signals
![[open source tool sharing] MCU debugging assistant (oscillograph / modification / log) - linkscope](/img/39/4d37c381f16dbe11acc64c92d0a1e5.png)
[open source tool sharing] MCU debugging assistant (oscillograph / modification / log) - linkscope

Spark 算子之sortBy使用

Redis主从复制过程

Large factory technology implementation | industry solution series tutorials

How can poor areas without networks have money to build networks?

New developments: new trends in cooperation between smartmesh and meshbox

Spark 算子之groupBy使用

How important is the operation and maintenance process? I heard it can save 2 million a year?

布隆过滤器在亿级流量电商系统的应用
随机推荐
5分钟,把你的Excel变成在线数据库,神奇的魔方网表excel数据库
s16.基于镜像仓库一键安装containerd脚本
leetcode-396 旋转函数
Go language, array, pointer, structure
Calculate the number of occurrences of a character
[AI weekly] NVIDIA designs chips with AI; The imperfect transformer needs to overcome the theoretical defect of self attention
捡起MATLAB的第(9)天
js正則判斷域名或者IP的端口路徑是否正確
布隆过滤器在亿级流量电商系统的应用
糖尿病眼底病变综述概要记录
Import address table analysis (calculated according to the library file name: number of imported functions, function serial number and function name)
MySQL - execution process of MySQL query statement
Best practices of Apache APIs IX high availability configuration center based on tidb
Date date calculation in shell script
R语言中实现作图对象排列的函数总结
Win11/10家庭版禁用Edge的inprivate浏览功能
Day (7) of picking up matlab
Large factory technology implementation | industry solution series tutorials
Basic greedy summary
Go language slice, range, set