php - 为 mac 安装特定的 PHP 版本
问题描述
我需要一个特定版本的 PHP for magento (7.1.3)
使用 home brew 或 curl,我只能指定一位小数(7.1、7.2 等)。
跑步
brew install php@7.1
最终得到我
php -v
PHP 7.1.29 (cli) (built: May 21 2019 20:05:17) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.29, Copyright (c) 1999-2018, by Zend
Technologies
尝试安装特定版本(就像您可以使用 nvm 使用节点一样):
brew install php@7.1.3
得到我
Error: No available formula with the name "php@7.1.3"
我尝试使用 curl 命令,同样的问题:
https://php-osx.liip.ch/install.sh | bash -s 7.1.3
得到我
Did or could not download package: 7.1.3-frontenddev
TL;DR:我如何在 mac 上安装 PHP (7.1.3) 的确切版本?
解决方案
对于 brew 中已弃用的 php 版本。请运行这个。
brew tap exolnet/homebrew-deprecated
然后选择你的版本。
brew install php@7.1
切换回第一个 PHP 版本。
brew link --force --overwrite php@7.1
这里是参考,
推荐阅读
- node.js - 发布时 NodeSSPI 2 分钟超时
- c# - C#根据逗号分隔字符串从列表中获取项目
- terraform - 无法通过代理通过带有 AzureRM 后端的 OctopusDeploy 应用 terraform
- maven - 通过字段“buildProperties”表达的不满足的依赖关系;嵌套异常是 org.springframework.beans.factory.NoSuchBeanDefinitionException
- javascript - JS 中的动态 import() 文件
- sql - 在 SQL Server 中格式化 DateTime 而不转换为字符串?
- c# - 使用 azure redis 进行单元测试和 IDistributedCache
- python - Python - 正则表达式不替换目录字符串
- uitableview - 查找 UIPickerView 选择的值,我在 UIAlertController 中添加为 SubView
- javascript - LARAVEL + Vue.js:使用刀片在 MPA 中显示整个页面的 vue.js 组件,对 SEO 不友好