asdf-community/asdf-php

PHP 7.3.24 doesn't install (Intel macOS)

ehossack opened this issue · 1 comments

Hi, not sure if I'm doing something wrong, but trying to install just the latest version of php on my mac. It seems to install PHP (or some other version of php is preinstalled, but I don't recall it), but then fail to register it with asdf. See below.

System details (Big Sur 11.4):

> uname -a
Darwin ehossack-computer.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64

Here's the last part of my shell output:

❯ echo $CFLAGS
-I/usr/local/opt/bzip2/include -I/usr/local/opt/readline/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
❯ echo $CPPFLAGS
-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/zlib/include -I/usr/local/opt/zlib/include
> asdf install php latest
... (truncated)
ln -s -f phar.phar /Users/ehossack/.asdf/installs/php/8.1.0RC5/bin/phar
HTTP request sent, awaiting response... Installing PHP FPM man page:      /Users/ehossack/.asdf/installs/php/8.1.0RC5/php/man/man8/
200 OK
Length: 3641841 (3.5M)
Saving to: ‘pear/install-pear-nozlib.phar’

install-pear-nozlib.phar                                                                                                    0%[                                                                                                                                                                                                                                                                                                                                     ]       0  --.-KB/s               Installing PHP FPM status page:   /Users/ehossack/.asdf/installs/php/8.1.0RC5/php/php/fpm/
install-pear-nozlib.phar                                                                                                  100%[====================================================================================================================================================================================================================================================================================================================================>]   3.47M  3.11MB/s    in 1.1s

2021-11-06 13:20:36 (3.11 MB/s) - ‘pear/install-pear-nozlib.phar’ saved [3641841/3641841]

[PEAR] Archive_Tar    - installed: 1.4.14
[PEAR] Console_Getopt - installed: 1.4.3
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util       - installed: 1.4.5
warning: pear/PEAR dependency package "pear/Archive_Tar" installed version 1.4.14 is not the recommended version 1.4.4
[PEAR] PEAR           - installed: 1.10.13
Wrote PEAR system config file at: /Users/ehossack/.asdf/installs/php/8.1.0RC5/pear.conf
You may want to add: /Users/ehossack/.asdf/installs/php/8.1.0RC5/lib/php to your php.ini include_path
Installing header files:          /Users/ehossack/.asdf/installs/php/8.1.0RC5/include/php/

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): Failed to open stream: No such file or directory in Command line code on line 1

Warning: hash_file(composer-setup.php): Failed to open stream: No such file or directory in Command line code on line 1
Installer corrupt
Warning: unlink(composer-setup.php): No such file or directory in Command line code on line 1

Could not open input file: composer-setup.php
 > php --version                                                                                                                                                                                                                                                                                                                                                                                                                      1 ✘  6m 25s
WARNING: PHP is not recommended
PHP is included in macOS for compatibility with legacy software.
Future versions of macOS will not include PHP.
PHP 7.3.24-(to be removed in future macOS) (cli) (built: May  8 2021 09:40:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies
>  asdf local php 7.3.24                                                                                                                                                                                                                                                                                                                                                                                                                      1 ✘
version 7.3.24 is not installed for php
> asdf list php
  No versions installed

Following the steps in this PR solved this for me (change openssl to openssl@1.1 in two places).

#97