macOS를 Mojave에서 Big Sur로 업데이트하면 Homebrew가 더 이상 시작되지 않습니다.

5324 단어 homebrewBigSur

소개



오랜만의 투고가 됩니다.
요 전날 macOS를 Mojave에서 Big Sur (11.1)로 업데이트 한 결과 Homebrew가 시작되지 않습니다.
brew doctor 실행 화면
~ % brew docter
Traceback (most recent call last):
    11: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `<main>'
    10: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require_relative'
     9: from /usr/local/Homebrew/Library/Homebrew/global.rb:29:in `<top (required)>'
     8: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
     7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
     6: from /usr/local/Homebrew/Library/Homebrew/os.rb:3:in `<top (required)>'
     5: from /usr/local/Homebrew/Library/Homebrew/os.rb:21:in `<module:OS>'
     4: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:58:in `prerelease?'
     3: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `version'
     2: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `new'
     1: from /usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:26:in `initialize'
/usr/local/Homebrew/Library/Homebrew/version.rb:368:in `initialize': Version value must be a string; got a NilClass () (TypeError)

해결 방법



Homebrew의 문제해결을 확인하면 "처음에는 brew update를 사용해보십시오."
実行画面

~ % brew update
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
〜以下略〜

이하, Homebrew의 사이트를 확인하면, 「Homebrew 2.6.0」으로부터 Big Sur를 서포트하고 있다고 하는 것.
2.6.0 - Homebrew

보충


brew doctor 실행하셨습니까? Warning이 나왔기 때문에 Homebrew 자체의 시작이 잘되는 것 같습니다
~ % brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Your Command Line Tools are too outdated.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you an update run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.


Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you an update run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.


Warning: The following directories do not exist:
/usr/local/Frameworks

You should create these directories and change their ownership to your account.
  sudo mkdir -p /usr/local/Frameworks
  sudo chown -R $(whoami) /usr/local/Frameworks

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  gettext

Warning: Your CLT does not support macOS 11.
It is either outdated or was modified.
Please update your CLT or delete it if no updates are available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you an update run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.


(자신의 환경에서는) Warning은 5개 있습니다만, 에러 내용을 보는 것과 동시에 해결할 수 있는 것도 있기 때문에, 실제로는
1. CommandLineTools 업데이트
해결책
터미널에서 softwareupdate --all --install --force를 실행해도
Software Update Tool

Finding available software
No updates are available.

되었기 때문에
~ % sudo rm -rf /Library/Developer/CommandLineTools
Password:(管理者パスワード)

~ % sudo xcode-select --install
xcode-select: note: install requested for command line developer tools

을 실행하고 한 번 삭제한 다음 다시 설치하여 해결했습니다.

2. Frameworks 디렉토리 생성 및 권한 설정
해결책
터미널에서

~ % sudo mkdir -p /usr/local/Frameworks
Password:(管理者パスワード)
실행
~ % whoami
(現在のユーザ名)
whoami 명령을 사용하여 현재 사용자 이름을 확인하고,
~ % sudo chown -R (現在のユーザ名)/usr/local/Frameworks

실행하고 해결했습니다.

3. gettext 패키지의 유효화(link화)
해결책
터미널에서

~ % brew link gettext
실행
Linking /usr/local/Cellar/gettext/0.19.8.1... 185 symlinks created

위와 같이 패키지를 활성화하고 해결했습니다.

상기 3개의 대응으로 해결했습니다.
도움이 되면 다행입니다.

좋은 웹페이지 즐겨찾기