install ext-zip for Mac

后端 未结 10 1932
野性不改
野性不改 2020-11-29 02:00

I am trying to run composer update and I get the following errors:

Problem 1
    - The requested PHP extension ext-zip * is missing from your sy         


        
10条回答
  •  醉话见心
    2020-11-29 02:06

    i know this thread has true answered, i do those with this approach :

    1. brew link php@7.3 it is showing hint to using
      echo 'export PATH="/usr/local/opt/php@7.3/bin:$PATH"' >> ~/.zshrc echo 'export PATH="/usr/local/opt/php@7.3/sbin:$PATH"' >> ~/.zshrc

    2. in terminal, echo 'export PATH="/usr/local/opt/php@7.3/bin:$PATH"' >> ~/.zshrc enter

    3. in terminal, echo 'export PATH="/usr/local/opt/php@7.3/sbin:$PATH"' >> ~/.zshrc enter

    4. next execution this : source ~/.zshrc

    5. execution which php the results must show /usr/local/opt/php@7.3/bin/php

    6. try again composer update, if show Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/Cellar/composer/1.9.2/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52 please change php.ini limit with memory_limit = -1

    7. try search php.ini, type in terminal /usr/local/opt/php@7.3/bin/php --ini , the results must show: Configuration File (php.ini) Path: /usr/local/etc/php/7.3 Loaded Configuration File: /usr/local/etc/php/7.3/php.ini Scan for additional .ini files in: /usr/local/etc/php/7.3/conf.d Additional .ini files parsed: /usr/local/etc/php/7.3/conf.d/ext-opcache.ini

    8. nano /usr/local/etc/php/7.3/php.ini, append memory_limit =-1,save

    9. restart php

    10. re-execution composer update.

    Hope my answer can help you.

提交回复
热议问题