macos brew 安装被禁止(disable)的Homebrew软件包的方法 - Error: xxx has
最近在macos上面利用 brew install mariadb@10.3 居然提示 Error: mariadb@10.3 has been disabled because it is not supported upstream! 查阅后发现这个版本官方于2024年5月制止维护,以是在brew安装时就提示了不受支持的非常。brew安装被禁止 disable 软件包的方法
下面以 mariadb@10.3 为例阐明安装方法:
1. 首先 brew edit 删除 disable 哪一行, 如 brew edit mariadb@10.3
实行这个下令后就会在编辑器中打开对应的brew formula,然后找到提示非常信息那一行,把他注释了保存。 brew edit xxx 下令现实上就是帮我们直接打开对应的 xxx.rb文件, 如下:
https://i-blog.csdnimg.cn/direct/049851ed163a4c979c7f9338cf15b4de.png
如上图所示, 注释掉提示非常的这行, 可能是 deprecate! 或者 disable! 等,
2. 在在brew安装下令前面增长环境变量设置HOMEBREW_NO_INSTALL_FROM_API=1 即
HOMEBREW_NO_INSTALL_FROM_API=1 brew install mariadb@10.3 HOMEBREW_NO_INSTALL_FROM_API=1 这个环境变量的作用就是告诉brew 不利用api中的formula而是利用你自己编辑后的, 如许就可以正常安装被brew禁止disable的软件包了。
brew 相干常见问题官方文档
Can I edit formulae myself?
Yes! It’s easy! If brew tap doesn’t show homebrew/core, set yourself up to edit a local copy:
[*]Set HOMEBREW_NO_INSTALL_FROM_API=1 in your shell environment,
[*]Run brew tap --force homebrew/core and wait for the clone to complete, then
[*]Run brew edit <formula> to open the formula in EDITOR.
You don’t have to submit modifications back to homebrew/core, just edit the formula to what you personally need and brew install <formula>. As a bonus, brew update will merge your changes with upstream so you can still keep the formula up-to-date with your personal modifications!
Note that if you are editing a core formula or cask you must set HOMEBREW_NO_INSTALL_FROM_API=1 before using brew install or brew update otherwise they will ignore your local changes and default to the API.
To undo all changes you have made to any of Homebrew’s repositories, run brew update-reset. It will revert to the upstream state on all Homebrew’s repositories.
更多brew常见问题文档FAQ (Frequently Asked Questions) — Homebrew Documentation
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]