不建议使用homebrew/php.我如何只能通过自制软件安装php7.0? [英] homebrew/php was deprecated. How i can install only php7.0 by homebrew?
问题描述
不建议使用homebrew/php.由于所有公式均已迁移,因此此水龙头现在为空.
homebrew/php was deprecated. This tap is now empty as all its formulae were migrated.
我需要为ioncube for php 7.0运行php脚本
I need run php script for ioncube for php 7.0
我如何只能通过自制软件安装php7.0?
How I can install only php7.0 by homebrew?
在php中,只有7.1、7.2、7.3版本.谢谢.
In php there are only 7.1, 7.2, 7.3 versions. Thx.
UPD.尝试过@bfontaine,没有运气.输出如下.
UPD. Tried @bfontaine with no luck. Output below.
Warning: Use php70 instead of deprecated homebrew/php/php70
Warning: Use php70 instead of deprecated homebrew/php/php70
Error: No available formula with the name "homebrew/core/php70"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
UPD 2
➜ homebrew-php git:(16a13e53) brew install --build-from-source homebrew/php/php70
==> Installing php70 from homebrew/php
==> Downloading https://php.net/get/php-7.0.27.tar.bz2/from/this/mirror
==> Downloading from https://www.php.net/distributions/php-7.0.27.tar.bz2
######################################################################## 100.0%
curl: (22) The requested URL returned error: 416
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "php70"
Download failed: https://php.net/get/php-7.0.27.tar.bz2/from/this/mirror
UPD 3
➜ homebrew-php git:(16a13e53) cd
➜ ~ export HOMEBREW_NO_AUTO_UPDATE=1
➜ ~ cd $(brew --prefix)/Homebrew/Library/Taps/homebrew
➜ homebrew git:(stable) ls
homebrew-core homebrew-php homebrew-services
➜ homebrew git:(stable) rm -rf homebrew-php
➜ homebrew git:(stable) git clone https://github.com/Homebrew/homebrew-php
Cloning into 'homebrew-php'...
remote: Enumerating objects: 35814, done.
remote: Total 35814 (delta 0), reused 0 (delta 0), pack-reused 35814
Receiving objects: 100% (35814/35814), 6.62 MiB | 1.02 MiB/s, done.
Resolving deltas: 100% (26635/26635), done.
➜ homebrew git:(stable) cd homebrew-php
➜ homebrew-php git:(master) git checkout 16a13e53acd2e77434c3a6e3723136c255ea7f33
Note: checking out '16a13e53acd2e77434c3a6e3723136c255ea7f33'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 16a13e53 Delete more formulae.
➜ homebrew-php git:(16a13e53) brew install --build-from-source homebrew/php
➜ homebrew-php git:(16a13e53) curl 'https://www.php.net/distributions/php-7.0.27.tar.bz2' -o "$(brew --cache homebrew/php/php70)"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13.4M 100 13.4M 0 0 2291k 0 0:00:06 0:00:06 --:--:-- 2373k
curl: (16) Error in the HTTP2 framing layer
➜ homebrew-php git:(16a13e53) curl 'https://www.php.net/distributions/php-7.0.27.tar.bz2' -o "$(brew --cache homebrew/php/php70)"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13.4M 100 13.4M 0 0 2368k 0 0:00:05 0:00:05 --:--:-- 2397k
➜ homebrew-php git:(16a13e53) brew install --build-from-source homebrew/php/php70
==> Installing php70 from homebrew/php
==> Downloading https://php.net/get/php-7.0.27.tar.bz2/from/this/mirror
==> Downloading from https://www.php.net/distributions/php-7.0.27.tar.bz2
######################################################################## 100.0%
curl: (22) The requested URL returned error: 416
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "php70"
Download failed: https://php.net/get/php-7.0.27.tar.bz2/from/this/mirror
➜ homebrew-php git:(16a13e53)
推荐答案
php@7.0不需要openssl 1.0.0,可以将其重新编译为使用1.1
php@7.0 does not require openssl 1.0.0 it can be recompiled to use 1.1
$ brew tap exolnet/homebrew-deprecated
$ brew reinstall --build-from-source php@7.0
这将在openssl 1.0.0中安装php@7.0,因此不需要安装openssl.请耐心等待,这将需要一些时间(在2020年的MacBook Pro上约为5分钟)
This will install php@7.0 with openssl 1.0.0, so no openssl installations are needed. Be patient, it will take some time (~5 minutes on a 2020 MacBook Pro)
来自Github问题: https://github.com/eXolnet/homebrew-deprecated/issues/14#issuecomment-619991377
from Github issue: https://github.com/eXolnet/homebrew-deprecated/issues/14#issuecomment-619991377
这篇关于不建议使用homebrew/php.我如何只能通过自制软件安装php7.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!