mac 安装 homebrew

摘要:

本文主要是下载安装包安装homebrew,然后配置环境变量Path。检验是否安装成功。

homebrew地址:macOS(或 Linux)缺失的软件包的管理器 --- Homebrew

在终端命令下载安装:

python 复制代码
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

安装缓慢,需要等待很久,可能还会安装失败。

下载安装包安装:

安装过程中注意安装界面的信息:每个界面都可以看看

配置Path:

python 复制代码
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.bash_profile 
python 复制代码
source ~/.bash_profile
python 复制代码
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc   
python 复制代码
source ~/.zshrc

实操:

  1. 创建并打开bash_profile 文件

    bash 复制代码
    vim  ./bash_profile
python 复制代码
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.bash_profile 
export PATH="/opt/homebrew/bin:$PATH"
  1. 按键 esc 然后输入 :wq 退出并保存

  2. 最后运行

    bash 复制代码
    source ./bash_profile

查看版本

(主要目的是检验是否安装成功)

bash 复制代码
brew --version 

结果

相关推荐
pe7er1 天前
macOS 应用无法打开(权限问题)解决方案
macos·mac
harmful_sheep4 天前
mac生效的终端查看
macos
iOS门童5 天前
macOS 应用"已损坏"无法打开?一文搞懂 Gatekeeper 与解决方案
macos
NPE~5 天前
[工具分享]Maccy —— 优雅的 macOS 剪贴板历史管理工具
macos·教程·工具·实用工具
差不多程序员5 天前
Mac安装OpenClaw-cn保姆级教程
macos
dzl843945 天前
mac 安装python
开发语言·python·macos
Bruce_Liuxiaowei5 天前
在 macOS 上通过 Docker 本地安装 OpenClaw 完整教程
macos·docker·容器·openclaw
阿捏利5 天前
详解Mach-O(十五)Mach-O __DATA_CONST
macos·ios·c/c++·mach-o
ShikiSuen5 天前
macOS 的 CpLk 中英切换卡顿的元凶在 InputMethodKit 本身
macos
xiayutian_c5 天前
如虎添翼-MacOS
macos