nicenote/docs/tools/homebrew.md

55 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
nav:
title: 工具
path: /tools
group:
title: 💊 homebrew
order: 2
path: /homebrew
---
# 💊 homebrew
## 安装脚本
苹果电脑标准安装脚本:(**推荐** 优点全面 缺点慢一点)
```
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
```
苹果电脑极速安装脚本:(优点安装速度快 缺点update功能需要命令修复
```
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" speed
```
Linux 标准安装脚本:
```
rm Homebrew.sh ; wget https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh ; bash Homebrew.sh
```
苹果电脑卸载脚本:
```
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"
```
Linux卸载脚本
```
rm HomebrewUninstall.sh ; wget https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh ; bash HomebrewUninstall.sh
```
## 常用命令
* 搜索包brew search [package-name]
* 查看包的信息brew info [package-name]
* 安装终端应用\环境brew install [package-name]
* 安装GUI应用 brew install --cask [AppName]
* 更新所有包brew update
* 更新某个包brew upgrade [package-name]
* 卸载某个包brew uninstall [package-name]
* 列出所有安装的包brew list
* 清理所有过时软件brew cleanup
## 常见问题
### 1. 如果报错 command not found : brew
先运行此命令/usr/local/Homebrew/bin/brew -v 如果是ARM架构的芯片运行/opt/homebrew/bin/brew -v 看是否能出来Homebrew的版本号。如果有版本号。
那就是path没有配置成功可以在 etc/paths 添加一下一个全局路径: /opt/homebrew/bin看下自己是x86还是arm架构