Homebrew 的多个并行版本?
是否可以与 Homebrew 并行安装多个版本?
我发现自己处于需要 sbt-0.7.x、sbt-0.10.x 和 sbt-0.11.0 的情况。我目前已手动安装了 sbt-0.7.7 和 sbt-0.10.1 以解决该问题(sbt-0.11.0 是 Homebrew 的最新“sbt”)。
Is it possible to install multiple versions side-by-side with Homebrew?
I find myself in a situation needing sbt-0.7.x, sbt-0.10.x and sbt-0.11.0. I've installed both sbt-0.7.7 and sbt-0.10.1 manually at the moment to work around the issue (with sbt-0.11.0 being the latest 'sbt' from Homebrew).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
要轻松地在公式版本之间切换,您可以使用:
例如:
要列出您已安装的版本,请尝试:
或:
如果您想删除旧版本,只需使用:
To easily switch between versions of formulae, you can use:
For example:
To list which versions you have installed try:
or:
If you want to get rid of older versions, just use:
是的。当您安装软件包的新版本时,它会保留旧版本。
/usr/local/bin
中的符号链接或指向最新版本的任何位置,但您仍然可以调用旧版本中的二进制文件(或链接到库)。brew list
查看已安装的内容。您可以查看包目录以查看所有版本;或者调用brew list --versions
来查看所有包和所有版本。Yeah. When you install a new version of a package, it keeps the old one. The symlinks in
/usr/local/bin
or wherever point to the latest version, but you can still call the binaries (or link to the libraries) in the older version.brew list
to see what's installed. You can look in package directories to see all the versions; or callbrew list --versions
to see all packages and all versions.从 Homebrew 2.0.0 开始,当调用
brew Upgrade
时,它会自动删除旧包。 (https://brew.sh/2019/02/02/homebrew-2.0 .0/)。要选择退出此行为,请设置环境变量:export HOMEBREW_NO_INSTALL_CLEANUP=1
As of Homebrew 2.0.0, it would remove old packages automatically when
brew upgrade
is called. (https://brew.sh/2019/02/02/homebrew-2.0.0/). To opt-out of this behavior, set the environment variable:export HOMEBREW_NO_INSTALL_CLEANUP=1