Mac OS平台下的软件包管理工具,好用到爆炸
baijin 2024-10-16 07:41:57 博客文章 7 ℃ 0 评论
这次要讲的工具叫做Homebrew,是一款Mac OS平台下的软件包管理工具,对于macos平台的软件安装非常有用,效率高,而且避开了App Store(我其实很讨厌App Store,但对于专业软件而言很多时候又很难绕开)
好长时间没用过这个玩意了,今天突然用到,给大家提一提,如果买了mac还没用起来的,12分推荐安装。
Homebrew这个工具支持安装、卸载、更新、查看、搜索等很多实用的功能。通过命令行直接进行软件包的安装,可以无需关注诸多依赖问题(我在ubuntu/centos/suselinux..上经常会遇到直接安装rpm包的场景,依赖问题通常让人吐血又没有太好的解决办法)
如果还是不知道这个是什么呢,我们可以把它类比成:apt-get、yum、zypper、npm、pip,我能想到的差不多就这么多了,再不知道,你只能先用用看了。
官方对于这个管理工具的定位是:Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.
Command Line Tools (CLT) for Xcode: xcode-select --install,developer.apple.com/downloads or Xcode 3
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
安装完成后有个源要注意下,这个是国外软件,通常这类包管理软件的源都是默认只想国外的网站的,那么使用的时候,下载速度会特别慢(装个依赖多、包又大的软件,能等到你蛋碎)
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
本文暂时没有评论,来添加一个吧(●'◡'●)