Mac

brew upgrade 오류는 brew reinstall php로 해결

OneBoard 2021. 4. 13. 20:26

매일 brew upgrade를 하는 것이 즐거움인데

며칠전에 오류가 나왔습니다.ㅠㅠ...

 

맥이 리눅스 기반이라서 완벽하다고 생각하시는 분들이 많은데

리눅스의 경우에는 툴들의 충돌도 많고 생각보다 부실한 것들도 많습니다.

 

oneboard@oneboarcBookPro ~ % brew upgrade   
Updating Homebrew...
error: could not apply 2e3ca1c... php@8.1: rebuild
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2e3ca1c... php@8.1: rebuild
To restore the stashed changes to /usr/local/Homebrew/Library/Taps/shivammathur/homebrew-php, run:
  cd /usr/local/Homebrew/Library/Taps/shivammathur/homebrew-php && git stash pop
==> Auto-updated Homebrew!
Updated 3 taps (shivammathur/php, homebrew/core and homebrew/cask).
==> New Formulae
organize-tool
==> Updated Formulae
Updated 38 formulae.
==> Updated Casks
Updated 80 casks.

 

 

해결 방법은???

한참전에 비슷한 오류가 있었습니다.

참조해서 오류는 없앴지만, brew 은근히 귀챦고, php 8.1 업그레이드 안됬습니다.ㅠㅠ...

oneboard.tistory.com/45

 

brew update 오류

brew update를 했더니, conflict 오류가 나왔습니다. 한번 오류 나오고 끝나는 것이 아니라 지속적으로 생기는 오류이구요. oneboard@oneboarcBookPro ~ % brew update error: could not apply bc7e597... Update..

oneboard.tistory.com

 

그런데, 또 오류가 나오는 겁니다. ㅠㅠ...

brew의 github를 보니, php 재설치를 하는 방법이 있어서 재설치 돌렸더니, 괜챦아졌습니다.

brew reinstall php ... 이게 답이네요. 엉킨거는 재설치 !

 

oneboard@oneboarcBookPro ~ % brew reinstall php               
==> Downloading https://ghcr.io/v2/shivammathur/php/php/manifests/8.0.3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/shivammathur/php/php/blobs/sha256:2d58b492c8b
==> Downloading from https://pkg-containers-az.githubusercontent.com/ghcr1/blobs
######################################################################## 100.0%
==> Reinstalling shivammathur/php/php 
==> Pouring php--8.0.3.big_sur.bottle.tar.gz
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set php_ini /usr/local/etc/php/8
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set php_dir /usr/local/share/pea
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set doc_dir /usr/local/share/pea
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set ext_dir /usr/local/lib/php/p
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set bin_dir /usr/local/opt/php/b
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set data_dir /usr/local/share/pe
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set cfg_dir /usr/local/share/pea
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set www_dir /usr/local/share/pea
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set man_dir /usr/local/share/man
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set test_dir /usr/local/share/pe
==> /usr/local/Cellar/php/8.0.3/bin/pear config-set php_bin /usr/local/opt/php/b
==> /usr/local/Cellar/php/8.0.3/bin/pear update-channels
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
    LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so

    <FilesMatch \.php$>
        SetHandler application/x-httpd-php
    </FilesMatch>

Finally, check DirectoryIndex includes index.php
    DirectoryIndex index.php index.html

The php.ini and php-fpm.ini file can be found in:
    /usr/local/etc/php/8.0/

To have launchd start shivammathur/php/php now and restart at login:
  brew services start shivammathur/php/php
Or, if you don't want/need a background service you can just run:
  php-fpm
==> Summary
🍺  /usr/local/Cellar/php/8.0.3: 499 files, 77.8MB
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /usr/local/Cellar/dnsmasq/2.82... (5 files, 495.4KB)
Error: Directory not empty @ dir_s_rmdir - /usr/local/Cellar/dnsmasq/2.82

 

GitHub - shivammathur/homebrew-php: Homebrew tap for PHP 5.6 to 8.1. PHP 8.1 is a nightly build.

 

shivammathur/homebrew-php

:beer: Homebrew tap for PHP 5.6 to 8.1. PHP 8.1 is a nightly build. - shivammathur/homebrew-php

github.com

 

반응형