hpbrew install 5.5.38 +default
===> phpbrew will now build 5.5.38
===> Loading and resolving variants...
Checking distribution checksum...
Checksum mismatch: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 != 473c81ebb2e48ca468caee031762266651843d7227c18a824add9b07b9393e38
Re-Downloading...
Downloading http://www.php.net/get/php-5.5.38.tar.bz2/from/this/mirror via curl extension
[==================================================================] 185.00/185.00B 100%
Redirecting to https://www.php.net/get/php-5.5.38.tar.bz2/from/this/mirror
CurlKit\CurlException: at [The Location header can not be found: HTTP/2 302
server: myracloud
date: Sun, 16 Jun 2019 04:05:58 GMT
content-type: text/html; charset=utf-8
content-language: en
x-frame-options: SAMEORIGIN
set-cookie: COUNTRY=NA%2C110.188.95.243; expires=Sun, 23-Jun-2019 04:05:58 GMT; Max-Age=604800; path=/; domain=.php.net
x-php-load: 0.07, 0.05, 0.06
status: 302 Found
location: https://www.php.net/distributions/php-5.5.38.tar.bz2
expires: Sun, 16 Jun 2019 04:05:58 GMT
cache-control: max-age=0]
Trace:
0) CurlKit\CurlDownloader->request('https://www.php.net/get/php-5.5.38.tar.bz2/from/this/mirror', [], ['https://www.php.net/get/php-5.5.38.tar.bz2/from/this/mirror'])
1) CurlKit\CurlDownloader->request('http://www.php.net/get/php-5.5.38.tar.bz2/from/this/mirror')
2) PhpBrew\Downloader\PhpCurlDownloader->process('http://www.php.net/get/php-5.5.38.tar.bz2/from/this/mirror', '/Users/luohengyi/.phpbrew/distfiles/php-5.5.38.tar.bz2')
3) PhpBrew\Downloader\BaseDownloader->download('http://www.php.net/get/php-5.5.38.tar.bz2/from/this/mirror', '/Users/luohengyi/.phpbrew/distfiles/php-5.5.38.tar.bz2')
4) PhpBrew\Tasks\DownloadTask->download('http://www.php.net/get/php-5.5.38.tar.bz2/from/this/mirror', '/Users/luohengyi/.phpbrew/distfiles', 'sha256', '473c81ebb2e48ca468caee031762266651843d7227c18a824add9b07b9393e38')
5) PhpBrew\Command\InstallCommand->execute('5.5.38', '+default')
6) call_user_func_array([PhpBrew\Command\InstallCommand, 'execute'], ['5.5.38', '+default'])
7) CLIFramework\CommandBase->executeWrapper(['5.5.38', '+default'])
8) CLIFramework\Application->run(['/usr/local/bin/phpbrew', 'install', '5.5.38', '+default'])
9) PhpBrew\Console->runWithTry(['/usr/local/bin/phpbrew', 'install', '5.5.38', '+default'])
10) require('phar:///usr/local/bin/phpbrew/scripts/phpbrew-emb.php')
I have de same issue.
Help
https://github.com/phpbrew/phpbrew/issues/1011
Here's the answer you need
Looks like you need to force-define the mirror?
phpbrew install --mirror=https://www.php.net 7.2.22 (from #1011 that @luohengyi posted).
The --mirror flag is no longer supported by PHPBrew (#1050). The bug itself seems to be caused by https://github.com/c9s/CurlKit/pull/4#discussion_r312761591 and should be filed/escalated upstream.
In the meanwhile, you can try using an alternative downloader using the --downloader options. The available downloaders are:
For instance, phpbrew install --downloader=php_stream 7.3.11 +neutral.
Most helpful comment
Looks like you need to force-define the mirror?
phpbrew install --mirror=https://www.php.net 7.2.22(from #1011 that @luohengyi posted).