<p>The reason seems to be that either the <em>PHP</em> version of the <em>MacOS Catalina</em> update or a version installed via <em>brew</em> do not come bundled with the ext-zip extension.</p>

<p>You can verify that by calling <code>php -m</code> in the Terminal. You will get a list of all modules and it will not contain the word <code>zip</code></p>

<p>Even if it contains the word <code>zip</code> it does not necessarily mean that <em>composer</em> has it available. This is caused by the way <em>ZSH</em> (shell on MacOS) handles the PATH variable.</p>

<p>In my case I used an <em>alias</em> pointing to the MAMP version of PHP (which has zip enabled), but composer was using the PHP version found in the PATH variable.</p>

<p>Solution for me: Since I am using <em>MAMP</em> I modified the PATH in /etc/paths to have the MAMP PHP PATH on the very beginning, e.g.</p>

<pre><code>/Applications/MAMP/bin/php/php7.1.31/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
</code></pre>

<p>After that change <code>composer update</code> should work again as expected (make sure you close your Terminal first and do the update in a new Terminal window). Also <code>php -m</code> should now definitely list the <em>zip extension</em></p>

CC BY-SA 4.0
2020-01-31T11:41:53.067Z
2020-03-10T06:42:28.340Z
2020-03-10T06:42:28.340Z
Matthias Redl-Mann
<p>When doing a <code>composer update</code> in a Craft project on MacOS Catalina, I suddenly get the following error:</p>

<pre><code>***** requires ext-zip * -&gt; the requested PHP extension zip is missing from your system.
</code></pre>

<p>Any ideas?</p>

<craft3><composer><zip>
composer update missing zip extension (ext-zip) on MacOS
# composer update missing zip extension (ext-zip) on MacOS

(Asked by: username_0 on 2020-01-31)

When doing a composer update in a Craft project on MacOS Catalina, I suddenly get the following error:
***** requires ext-zip * -> the requested PHP extension zip is missing from your system.

Any ideas?

**Tags:** craft3, composer, zip

---

## 1 answers

### Answer by username_0 on 2020-01-31. Score: 4 | Accepted answer

The reason seems to be that either the PHP version of the MacOS Catalina update or a version installed via brew do not come bundled with the ext-zip extension.
You can verify that by calling php -m in the Terminal. You will get a list of all modules and it will not contain the word zip
Even if it contains the word zip it does not necessarily mean that composer has it available. This is caused by the way ZSH (shell on MacOS) handles the PATH variable.
In my case I used an alias pointing to the MAMP version of PHP (which has zip enabled), but composer was using the PHP version found in the PATH variable.
Solution for me: Since I am using MAMP I modified the PATH in /etc/paths to have the MAMP PHP PATH on the very beginning, e.g.
/Applications/MAMP/bin/php/php7.1.31/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

After that change composer update should work again as expected (make sure you close your Terminal first and do the update in a new Terminal window). Also php -m should now definitely list the zip extension


---

