Can't install PHP 5.6 on MacOS Catalina with Homebrew

Viewed 1691

Environment:

mac OS Catalina 10.15.6 (19G2021)

I am trying to install PHP 5.6 version. I have followed https://getgrav.org/blog/macos-catalina-apache-multiple-php-versions

I have tried the following

brew install --build-from-source php@5.6

and got the following error.

Updating Homebrew...
==> Installing php@5.6 from exolnet/deprecated
==> Downloading https://php.net/get/php-5.6.40.tar.xz/from/this/mirror
Already downloaded: /Users/sreejith/Library/Caches/Homebrew/downloads/ab2ea146f7d8c5258e6d33e9522dac5528cbc3e966bc6e5689fa57860dbb5441--php-5.6.40.tar.xz
==> Patching
==> ./buildconf --force
==> ./configure --prefix=/usr/local/Cellar/php@5.6/5.6.40 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.6 --with-config-file-path=/usr/loca
==> make
Last 15 lines from /Users/sreejith/Library/Logs/Homebrew/php@5.6/03.make:
        if (!dsa->p || !dsa->q || !dsa->g) {
                                   ~~~^
/usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:107:16: note: forward declaration of 'struct dsa_st'
typedef struct dsa_st DSA;
               ^
/private/tmp/php@5.6-20200914-61731-1cgvxm1/php-5.6.40/ext/openssl/openssl.c:3560:9: error: incomplete definition of type 'struct dsa_st'
        if (dsa->priv_key || dsa->pub_key) {
            ~~~^
/usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:107:16: note: forward declaration of 'struct dsa_st'
typedef struct dsa_st DSA;
               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [ext/openssl/openssl.lo] Error 1
make: *** Waiting for unfinished jobs....

Any idea to resolve this issue? Thanks in advance.

0 Answers
Related