当前位置: 首页 > news >正文

MacOS安装brew

背景

心血来潮想写点blog,一个tree命令给我折腾崩溃了,生成一个文件树结构咋就这么难!
python没有库一键打印,linus或者macos可以用tree命令,但是macos它默认咋没有呢!

坑们

第一坑·brew

理想情况下brew install tree就安上了,可是我没有brew!

第二坑·安装brew

好,没有brew,我来安一下,kiwi告诉我用git命令clone,可是丫也没有git啊
git咋装,嗯xcode装了之后就有git可以用了,xcode这玩意可大啊,装起来费劲的很

出坑·国内源安装brew

就在我git装好了,准备安装brew之际,达模型突然开窍了,直接用国内源的brew安装脚本不就行了么

(base) zhangjian@ZhangJiandeMacBook-Air mac - 数据 % /bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
Password:
==> You are using macOS 10.15.
==> We (and Apple) do not provide support for this old version.
因为系统版本,可能会遇到一些未知问题==> 安装提示Mac下镜像飞速安装Homebrew教程(请收藏):https://brew.idayer.com/打个小广告
欢迎使用[快系列]教程,必出精品,安装有保障!- [快系列]stable-diffusion-webui: https://brew.idayer.com/install/stable-diffusion-webui
- [快系列]nvm快速安装教程: https://brew.idayer.com/install/nvm-for-nodejs安装遇到问题,请添加讨论群寻求Homebrew的安装帮助。当然也非常欢迎大家加群聊天摸鱼,讨论mac、软件、摄影,扫码关注公众号:湖中剑,回复'brew'加群。█████████████████████████████████████
█████████████████████████████████████
████ ▄▄▄▄▄ █▀█ █▄▀▄ ▄ ▄▄██ ▄▄▄▄▄ ████
████ █   █ █▀▀▀█ ▀█▀▀▀▀▄▀█ █   █ ████
████ █▄▄▄█ █▀ █▀▀█▄▀ █▀▄ █ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄▀ ▀▄█▄▀ █▄▀ █▄▄▄▄▄▄▄████
████     ▀▄▄▄▄▀▄▀▄▄█▀▀█ █ ▀ ▀▄█▄▀████
████ ▀█▄▀▀▄  █▄█▀█ ▄██ █ ▀ ▄▄██▀█████
████ █   █▄ ▄ ▄█▄ ▀  ██ ▀ ▀▀▀▄ █▀████
████ ██▄██▄▀ █  ▄█▀ ▄▄▀▀ ▀ █▄█▄▀█████
████ ▄ ▀▄▄▄▀█▄ ▄▀     ▀ ▀█▀ ▀▀ █▀████
████ █ ▀▀▀▄█▄█▄█▀█▀▄ █▀▀▄▄█▄▄▄▄▀█████
████▄██▄▄█▄█▀▀▀█▄█▄ ▀▄▀█ ▄▄▄ ▀   ████
████ ▄▄▄▄▄ █▄▀  ▄█▄  ▄▀  █▄█  ▄▀█████
████ █   █ █ ▀▄▄ ▀▄ ▀███ ▄▄▄▄ ▄▀ ████
████ █▄▄▄█ █ ▄▄▀ ██▄▀▄▀▄ ▀▄   ▄ █████
████▄▄▄▄▄▄▄█▄▄█▄▄████▄█████▄▄█▄██████
█████████████████████████████████████
█████████████████████████████████████请按回车键(RETURN)继续安装,按其他任意按键取消安装
==> /usr/bin/sudo /usr/sbin/chown -R zhangjian:admin /usr/local/Homebrew==> Downloading and installing Homebrew...
remote: Enumerating objects: 307886, done.
remote: Counting objects: 100% (95978/95978), done.
remote: Compressing objects: 100% (11539/11539), done.
remote: Total 307886 (delta 94535), reused 84483 (delta 84439), pack-reused 211908
Receiving objects: 100% (307886/307886), 92.05 MiB | 12.10 MiB/s, done.
Resolving deltas: 100% (221515/221515), done.
remote: Enumerating objects: 55, done.
remote: Counting objects: 100% (35/35), done.
remote: Total 55 (delta 35), reused 35 (delta 35), pack-reused 20
Unpacking objects: 100% (55/55), done.
HOMEBREW_BREW_GIT_REMOTE set: using https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git as the Homebrew/brew Git remote.
==> Updating Homebrew...
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/bottles-portable-ruby/portable-ruby-3.4.5.el_capitan.bottle.tar.gz
################################################################################ 100.0%
==> Pouring portable-ruby-3.4.5.el_capitan.bottle.tar.gz
==> 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 (nor will any be during this install run).==> Homebrew is run entirely by unpaid volunteers. Please consider donating:https://github.com/Homebrew/brew#donations==> Next steps:
自动配置环境变量
执行成功重要信息!!!重要信息!!!重要信息!!!
如果遇到 command not found brew,请执行下面脚本完成安装或者直接重新打开终端:
eval "$(/usr/local/bin/brew shellenv)"==> 🎉 恭喜,安装成功!
- 验证命令: brew help
- 请收藏,谨防失联: https://brew.idayer.com==> 如果有幸帮助到你,可以考虑请我喝杯咖啡~☕ 喝咖啡:https://brew.idayer.com/reward/(base) zhangjian@ZhangJiandeMacBook-Air mac - 数据 % brew --version
Homebrew 4.6.3
(base) zhangjian@ZhangJiandeMacBook-Air mac - 数据 % brew install tree
==> Downloading https://formulae.brew.sh/api/formula.jws.json
==> Downloading https://formulae.brew.sh/api/cask.jws.json
Warning: You are using macOS 10.15.
We (and Apple) do not provide support for this old version.This is a Tier 3 configuration:https://docs.brew.sh/Support-Tiers#tier-3
You can report Tier 3 unrelated issues to Homebrew/* repositories!
Read the above document instead before opening any issues or PRs.==> Fetching downloads for: tree
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/1fc8ebc234f37e
################################################################################ 100.0%
==> Fetching tree
==> Downloading https://github.com/Old-Man-Programmer/tree/archive/refs/tags/2.2.1.tar.
==> Downloading from https://codeload.github.com/Old-Man-Programmer/tree/tar.gz/refs/ta
-#O=#  #   #                                                                          
==> make PREFIX=/usr/local/Cellar/tree/2.2.1 MANDIR=/usr/local/Cellar/tree/2.2.1/share/
🍺  /usr/local/Cellar/tree/2.2.1: 9 files, 186.2KB, built in 19 seconds
==> Running `brew cleanup tree`...
Disable this behaviour by setting `HOMEBREW_NO_INSTALL_CLEANUP=1`.
Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
==> No outdated dependents to upgrade!
(base) zhangjian@ZhangJiandeMacBook-Air mac - 数据 % tree
.
└── 未命名文件夹├── Miniconda3-latest-MacOSX-x86_64.sh└── PyCharm 2022.2.4 (intel芯片)Mac.dmg2 directories, 2 files
(base) zhangjian@ZhangJiandeMacBook-Air mac - 数据 % ls
未命名文件夹
http://www.sczhlp.com/news/12492/

相关文章:

  • mysql 主从架构详解
  • AI促进研发管理案例
  • Java面向对象基础——11.class版本
  • jr数学的退休生活-2
  • inode节点扩容
  • AI机器人有贪嗔痴吗?
  • 抖音中国移动发布动感地带联名卡,火山引擎数智平台提供技术支持
  • 手把手搭建自动化测试环境:10分钟搞定Python/Java双环境
  • 正确理解EFCore导航属性与Include
  • 飞算JavaAI开发助手到底有多强
  • HTTP状态码
  • CF490F 题解
  • 来火山引擎「算子广场」,一键处理多模态数据
  • 《JMeter核心技术、性能测试与性能分析》 教学大纲及标准
  • AT_arc066_d [ARC066F] Contest with Drinks Hard 题解
  • linux根目录挂载物理分区,导致根目录无法扩容,已部署的人大金仓数据库,所在的目录拷贝到新磁盘后,重新挂载到原目录,导致无法授权问题
  • CF1408E Avoid Rainbow Cycles
  • 飞算JavaAI开发助手:用“说人话”生成完整Java工程,效率飙升500%
  • rsbuild中使用svelte模板报错(未解决)
  • mysql5.7版本部署
  • 泛型哲学
  • 从零开始学MCP(1)| MCP 协议核心原理解析
  • Uniapp 之renderjs解决swiper+多个video卡顿问题
  • 新增两大模型!TRAE 中国版支持 GLM-4.5、国际版支持 o3
  • 关于2025ChinaJoy(二)
  • TRAE cue 背后的挑战与思考
  • 知识图谱在 AI 测试开发中的应用
  • sort() 和 sorted()的区别
  • TRAE cue 迎来月度最大更新,模型能力以及时延大幅优化
  • kubectl logs 报错问题解决