英文:
Homebrew install specific minor php version
问题
When installing brew install php@8.1
, it automatically installs the latest version, which is 8.1.15. Due to development purposes, I need to install another minor version, such as 8.1.7. Since minor versions are hardcoded in formulas, it's not possible to install a specific minor version out of the box. What is the easiest way to use an old formula if I could find it in the repository's commit history? I tried this, as was advised in a different Stack Overflow thread:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/83b80f3b76c9cbd79e914f927a45a083b1d047e1/Formula/php.rb
But it literally won't let me:
Error: Installation of php from a GitHub commit URL is unsupported! `brew extract php` to a stable tap on GitHub instead.
Any ideas?
英文:
When installing brew install php@8.1
it automatically installs latest version 8.1.15. Due to the development purposes I need to install another minor version (e.g. 8.1.7). Since minor versions are hardcoded in formulas, it's not possible to install specific minor version out of the box. What is the easiest way to use an old formula if I could find it in the repo's commit history? I tried this as was advised in different SO thread:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/83b80f3b76c9cbd79e914f927a45a083b1d047e1/Formula/php.rb
But it literally won't let me to:
Error: Installation of php from a GitHub commit URL is unsupported! `brew extract php` to a stable tap on GitHub instead.
Any ideas?
答案1
得分: 1
你需要执行重置提交的黑客操作,以将其重置为这个提交。
就像这篇帖子中的选项3一样。
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论