source

Mac용 ext-zip 설치

nicesource 2022. 11. 24. 20:44
반응형

Mac용 ext-zip 설치

하고 있다.composer update하다

Problem 1
    - The requested PHP extension ext-zip * is missing from your system. Install or enable PHP's zip extension.
  Problem 2
    - maatwebsite/excel 3.1.10 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.11 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.12 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.13 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.14 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.15 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.16 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.17 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.7 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.8 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.9 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.x-dev requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.2.x-dev requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.0 requires phpoffice/phpspreadsheet ^1.4 -> satisfiable by phpoffice/phpspreadsheet[1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.1 requires phpoffice/phpspreadsheet ^1.4 -> satisfiable by phpoffice/phpspreadsheet[1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.2 requires phpoffice/phpspreadsheet ^1.4 -> satisfiable by phpoffice/phpspreadsheet[1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.3 requires phpoffice/phpspreadsheet ^1.4 -> satisfiable by phpoffice/phpspreadsheet[1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.4 requires phpoffice/phpspreadsheet ^1.4 -> satisfiable by phpoffice/phpspreadsheet[1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.5 requires phpoffice/phpspreadsheet ^1.4 -> satisfiable by phpoffice/phpspreadsheet[1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - maatwebsite/excel 3.1.6 requires phpoffice/phpspreadsheet ^1.4 -> satisfiable by phpoffice/phpspreadsheet[1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
    - phpoffice/phpspreadsheet 1.9.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - phpoffice/phpspreadsheet 1.8.2 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - phpoffice/phpspreadsheet 1.8.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - phpoffice/phpspreadsheet 1.8.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - phpoffice/phpspreadsheet 1.7.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - phpoffice/phpspreadsheet 1.6.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - phpoffice/phpspreadsheet 1.5.2 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - phpoffice/phpspreadsheet 1.5.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - phpoffice/phpspreadsheet 1.5.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - phpoffice/phpspreadsheet 1.4.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - phpoffice/phpspreadsheet 1.4.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - Installation request for maatwebsite/excel ^3.1.0 -> satisfiable by maatwebsite/excel[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.14, 3.1.15, 3.1.16, 3.1.17, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.1.x-dev, 3.2.x-dev].

composer update

하루아침에 제가 실수를 해서 Mac이 OS를 자동으로 업데이트하게 해서 지금 MacOS Catalina에 있습니다.

추가해 보았습니다.

 "require": {
    "ext-zip": "*",
 }

내 작곡가 json에게..하지만 그 확장자는 다운로드 되지 않습니다.

Mac을 Catalina로 업데이트한 후에도 같은 문제가 있었습니다.여기 나에게 효과가 있었던 것이 있다.

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

그런 다음 콘솔을 새로고침합니다.

zip 모듈과 함께 php 7.3.10을 설치합니다.버전을 확인하려면 php -v를 사용하고 모듈에는 php -m을 사용할 수 있습니다.

다음 명령어는 macOS Catalina의 문제를 해결합니다.

brew link php@7.3 --force

2020년 3월 10일, 나는 다음과 같이 할 수 있다.

brew install php  

PHP에 관한 명령어 중 유일하게 동작합니다.그래서 마지막 게시물에 나타난 명령어는 더 이상 사용되지 않는다고 생각합니다.

brew 링크가 작동하지 않는 경우 다음 방법으로 설치된 php 버전을 확인하십시오.

ls /usr/local/opt/php*

여기에서는, 다음과 같은 버전이 표시됩니다.

/usr/local/opt/php@7.3/bin:$PATH

다음과 같은 출력이 제공됩니다.

/usr/local/opt/php@7.3:
INSTALL_RECEIPT.json        include
LICENSE                     lib
NEWS                        pecl
README.md                   sbin
bin                         share
homebrew.mxcl.php@7.3.plist

이제 $PATH에 링크하면 다음과 같이 할 수 있습니다.

echo 'export PATH="/usr/local/opt/php@7.3/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/php@7.3/sbin:$PATH"' >> ~/.zshrc
source ~/.zshrc

주의: .zshrc는 터미널 셋업이기 때문에 사용하고 있습니다.bash일 경우 그에 맞게 사용하세요.

다음을 실행하여 MacOS에 링크된 php 버전을 확인할 수 있습니다.

which php

이것에 의해, 다음의 출력이 표시됩니다.

/usr/local/opt/php@7.3/bin/php

바로 그겁니다.Composer 업데이트를 시도해도 확장자 문제가 발생하지 않습니다.

출처(일부) : https://medium.com/ @http:/installing-http:/installing-http-inter-mac-after-homebrew-acfddd6be602

2020-05-16 갱신

@mark-market-market-market-market-market-market-market-market-market-market. 하면 안 요.--ignore-platform-reqs옵션을 선택합니다.

이 옵션은 플랫폼 요건을 무시하고 패키지의 특정 버전을 설치할 것이라고 생각했습니다.그러나 실제로는 플랫폼 요건을 무시하고 사용 가능한 패키지의 최고 버전을 설치합니다.

따라서 누락된 PHP 확장이 필요한 경우 설치(또는 활성화)만 하면 됩니다.

참조: ignore-platform-reqs는 올바른 버전이 아닌 dev-master를 설치합니다.

원래의

<<>>님이 없는 ext-zip를 사용할 수 (「 」 「 」 「 」 「 」 「 」--ignore-platform-reqs옵션을 지정하여 요건을 무시합니다.

$ composer update --ignore-platform-reqs

이건 내게 효과가 있었다.

brew update brew install php@7.3 brew link php@7.3 brew link php@7.3 --force

도움이 되었으면 좋겠다

python .brew install php.

/usr/local/Frameworks않아서 수 습니다.sudo mkdir /usr/local/Frameworks

cd /usr/local/

나서 나는 울어야 : 리고 then then then then then then then then then then then then then then then 。sudo chown -R myuser:admin Frameworks

을 기반으로 ./usr/local.

내가 도망갈 수 있어brew link python 뛰었습니다.brew install php을 하다

php -v3.php 7.3.18은 php 7.3.10이 됩니다.

강제 링크 대신 MacOS Catalina에서도 문제를 해결할 수 있습니다.

php 바이너리 경로를 bash 프로파일에 추가하여 예를 들어 다음과 같습니다.

echo 'export PATH="/usr/local/opt/php@7.3/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/php@7.3/sbinbin:$PATH"' >> ~/.bash_profile

제 경우엔 간단하게

brew link --overwrite php

다른 사용자가 이미 언급했듯이:이 에러는, 통상, PATH 변수가 올바르게 설정되어 있지 않기 때문에, 일부의 MAMP 바이너리가 단말기에서 검출되지 않는 것을 의미합니다.

셸 구성

는 다음 요..zshrc (오류).bashrc「PHP」 「PATH:

export PHP_VERSION=$(php -r 'echo PHP_VERSION;')
export PATH="/Applications/MAMP/Library/bin/:$PATH"
export PATH="/Applications/MAMP/bin/php/php$PHP_VERSION/bin/:$PATH"

세부 사항

  • export PHP_VERSION=$(php -r 'echo PHP_VERSION;')PHP PHP PHP PHP PHP PHP PHP PHP PHP의 PHP는, PHP의 PHP의 PHP는, PHP의 PHP입니다.후에 할 수 .$PHP_VERSION모든 셸 스크립트에서.
  • export PATH="/Applications/MAMP/Library/bin/:$PATH"은 MAMP 하기 위해 입니다.
  • export PATH="/Applications/MAMP/bin/php/php$PHP_VERSION/bin/:$PATH"한 부분이고, '어울릴 수 없다', '어울릴 수 없다'가 되어 있습니다.phpX.Y.Z폴더를 경로 목록으로 이동합니다.에서는, 「」를 하고 있습니다.$PHP_VERSION을 사용법

확인.

의 을 에 한 후.zshrc (오류).bashrc) 된 셸 해야 합니다

source ~/.zshrc   # or ~/.bashrc

마지막으로 PATH 값이 올바른지 여부를 빠르게 확인할 수 있습니다.

echo -e ${PATH//:/\\n}

# Output:
...
/Applications/MAMP/bin/php/php7.4.12/bin/    ← this line contains the PHP version
/Applications/MAMP/Library/bin/
...

나는 이 스레드가 참된 답을 가지고 있다는 것을 알고 있으며, 나는 이 접근방식으로 그것을 한다:

  1. brew link php@7.3
    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. 경우echo 'export PATH="/usr/local/opt/php@7.3/bin:$PATH"' >> ~/.zshrc라고 입력합니다.

  3. 경우echo 'export PATH="/usr/local/opt/php@7.3/sbin:$PATH"' >> ~/.zshrc라고 입력합니다.

  4. : 음음음 :source ~/.zshrc

  5. ★★★which php는 반드시 결결 the the the the the the the the the the the the the the the the라고 나와야 /usr/local/opt/php@7.3/bin/php

  6. 컴포저 업데이트를 다시 시도합니다(표시된 경우). 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을 php.ini로 변경해 .memory_limit = -1

  7. search php 를 하고 terminal php.ini 를 합니다./usr/local/opt/php@7.3/bin/php --ini File 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=, memory_limit =-1, "memory_limit" 추가

  9. restart ph

  10. 컴포저 업데이트를 다시 실행합니다.

제 답변이 도움이 되길 바랍니다.

위의 솔루션은 MacOS Big Sur에서는 작동하지 않았습니다.다만, 작업 솔루션에 대해 설명하겠습니다.

  1. https://pecl.php.net/package/zip에서 최신 tarbal 다운로드

  2. brew install pcre2

  3. 심볼링크를 수정하지만 스텝4에서 zip-1.20.1을 설치하기 위해 php(which php)와 pcre2(which pcre2)의 버전을 확인합니다.

    ln - s / opt / homebrew / Cellar / pcre2 / 10.40 / include / pcre2 . h / opt / homebrew / opt / php@ 7 . 3 / include / php / ext / pcre / pcre2 . h

  4. sudo pear install ~/Downloads/zip-1.20.1.tgz

결과: 설치 중/opt/homebrew/Cellar/php@7.3/7.3.33_2/pecl/20180731/zip.soinstall ok: channel://pecl.php.net/zip-1.20.1 확장 zip이 php.ini로 활성화됨

  1. Apache 재시작:sudo apachectl restart

  2. apache에서 사용하는 php와 단말기에서 사용하는 php의 위치가 동일한지 확인합니다(MacOS homebrew!).따라서 실행한다.which php터미널에서 다음 명령을 사용하여 php 파일을 엽니다.exec('which php')httpd.conf 파일에서 php 경로가 올바른 php 버전을 링크하는지 확인합니다.

언급URL : https://stackoverflow.com/questions/58290566/install-ext-zip-for-mac

반응형