13

MacOS 10.15 Catalina installed version of PHP7.3.8 does not include the PHP extension zip. How do I go about finding and installing that zip extension.

Brew install php73-zip reports no available formula with that name.

ShooShoSha
  • 956
  • 10
  • 17
DBerg
  • 159
  • 1
  • 1
  • 7

2 Answers2

23

here is what I found @ install ext-zip for Mac

I had the same problem after updating my Mac to Catalina. Here is what worked for me.

brew update
brew install php@7.3
brew link php@7.3

Then reload your console.

It will install PHP 7.3.10 with the zip module. You can use PHP -v to check for the version, and PHP -m for the modules.


Side note: in case you don't have Homebrew (brew) installed you can visit: https://brew.sh/

A basic install of Homebrew (brew)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Paste that in a macOS Terminal prompt.

Jah
  • 986
  • 5
  • 26
-2

Homebrew formula/package php is compiled with the zip extension enabled by default.

Homebrew is Homebrew, it's not MacPorts or any other Linux package manager. There's no need to install another package to enable the zip extension. Please check the fact before report the problem.

# https://github.com/Homebrew/homebrew-core/blob/48a3a49c57b22eb1450b01e7867cf054a89c5a7b/Formula/php.rb#L31
class Php < Formula
  desc "General-purpose scripting language"
  homepage "https://www.php.net/"
  url "https://www.php.net/distributions/php-7.3.10.tar.xz"
  sha256 "42f00a15419e05771734b7159c8d39d639b8a5a6770413adfa2615f6f923d906"

...

  depends_on "libsodium"
  depends_on "libzip"
  depends_on "openldap"

...

      --enable-wddx
      --enable-zip
      --with-apxs2=#{Formula["httpd"].opt_bin}/apxs

...

      --with-libedit#{headers_path}
      --with-libzip
      --with-mhash#{headers_path}
...
Simba
  • 23,537
  • 7
  • 64
  • 76
  • 2
    Perhaps you don't understand the issue. The PHP installed when upgrading to macOS 10.15 catalina does not include the zip extension. That is the problem I was trying to solve. – DBerg Oct 11 '19 at 13:26