Warning: Xcode alone is not sufficient on Mojave.
이벤트 : xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
% brew update
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Updated 3 taps (homebrew/core, homebrew/cask and homebrew/cask-fonts).
#...省略...
원인 : OS 업데이트에서 XCode의 CommandLineTools / usr 디렉토리의 bin 디렉토리가 분실되었기 때문에?
빙글빙글보고 몇 개의 사이트를 보면 OS의 업데이트 후에 얼마 안되는 것 같다.
# おぉ、エラーメッセージにあるbinディレクトリがない!
% ls -la /Library/Developer/CommandLineTools/usr
total 0
drwxr-xr-x 3 root wheel 96 12 16 19:42 .
drwxr-xr-x 3 root wheel 96 12 16 19:42 ..
drwxr-xr-x 3 root wheel 96 12 16 19:42 share
해결책 : xcode-select 설치
xcode-select
설치 # xcode-selectをダイアログに従ってインストールする
% xcode-select --install
xcode-select: note: install requested for command line developer tools
# エラーが消えたか確認する
% brew update
Updated 1 tap (homebrew/core).
No changes to formulae.
이벤트 : Warning: Xcode alone is not sufficient on Mojave.
$ 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: No developer tools installed.
Install the Command Line Tools:
xcode-select --install
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Warning: Xcode alone is not sufficient on Mojave.
Install the Command Line Tools:
xcode-select --install
원인 : Xcode.app를 삭제했기 때문에
애초에 Xcode.app를 삭제한 것이 일의 시작이었을 것이다···.
Mac에서 Xcode는 중요한 것이었던 것 같다 ... 포기하고 설치한다.
해결책 : xcode-select 설치
Apple 사이트 에서 dmg 파일 다운로드
xcode-select
설치하기# xcode-selectをインストールする
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
# Warningが消えたか確認する
$ brew update
Already up-to-date.
$ brew doctor
Your system is ready to brew.
실패한 대응 : Xcode는 사용하지 않기 때문에 제거
Xcode.app
를 /Applications
에서 삭제했지만 불충분했던 모양. # /Library/Preferences/配下
$ find /Library/Preferences/ -type f | grep -i xcode
/Library/Preferences//com.apple.dt.Xcode.plist
$ find /Library/Preferences/ -type f | grep -i xcode | sudo xargs rm
$ find /Library/Preferences/ -type f | grep -i xcode
$
# ~/Library/Preferences/配下
$ find Library/Preferences/ -type f | grep -i xcode
Library/Preferences//com.apple.dt.xcodebuild.plist
Library/Preferences//com.apple.dt.Xcode.plist
Library/Preferences//com.apple.preferences.extensions.XcodeSourceEditor.plist
Library/Preferences//com.apple.preferences.extensions.XcodeSourceControlHost.plist
$ find Library/Preferences/ -type f | grep -i xcode | xargs rm
$ find Library/Preferences/ -type f | grep -i xcode
$
# ~/Library/Caches/com.apple.dt.Xcode/配下
$ find Library/Caches/ -type f | grep -i xcode
Library/Caches//com.apple.dt.Xcode/fsCachedData/70D9F1CB-B3B7-4605-AD98-4C911D694D14
Library/Caches//com.apple.dt.Xcode/Cache.db-shm
Library/Caches//com.apple.dt.Xcode/Cache.db-wal
Library/Caches//com.apple.dt.Xcode/Cache.db
$ find Library/Caches/ -type d | grep -i xcode | xargs rm -rf
$ find Library/Caches/ -type f | grep -i xcode
$
# ~/Library/Application Support/com.apple.sharedfilelist/配下
$ find Library/Application\ Support/com.apple.sharedfilelist/ -type f | grep -i xcode | sed -e 's/ /\\ /g'
Library/Application\ Support/com.apple.sharedfilelist//com.apple.LSSharedFileList.ApplicationRecentDocuments/com.apple.dt.xcode.sfl
Library/Application\ Support/com.apple.sharedfilelist//com.apple.LSSharedFileList.ApplicationRecentDocuments/com.apple.dt.xcode.sfl2
$ find Library/Application\ Support/com.apple.sharedfilelist/ -type f | grep -i xcode | sed -e 's/ /\\ /g' | xargs rm
$ find Library/Application\ Support/com.apple.sharedfilelist/ -type f | grep -i xcode
$
# ~/Library/Application Support/Xcodeディレクトリ
$ find Library/Application\ Support/ -maxdepth 1 -type d | grep -i xcode
Library/Application Support//Xcode
$ find Library/Application\ Support/ -maxdepth 1 -type d | grep -i xcode | sed -e 's/ /\\ /g' | xargs rm -rf
$ find Library/Application\ Support/ -maxdepth 1 -type d | grep -i xcode
$
# ~/Library/Developer/Xcodeディレクトリ
$ find Library/Developer/ -maxdepth 1 -type d | grep -i xcode
Library/Developer//Xcode
$ find Library/Developer/ -maxdepth 1 -type d | grep -i xcode | sed -e 's/ /\\ /g' | xargs rm -rf
$ find Library/Developer/ -maxdepth 1 -type d | grep -i xcode
# ~/Library/Developer/CoreSimulator/配下にはなかった
$ find Library/Developer/CoreSimulator/ -type f | grep -i xcode
$
# 今一度doctorする
$ 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: No developer tools installed.
Install the Command Line Tools:
xcode-select --install
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Warning: Xcode alone is not sufficient on Mojave.
Install the Command Line Tools:
xcode-select --install
# がーーん、だめだった・・・じゃ、update・・・で悪化していることに気がついた
$ brew update
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask).
# 省略
Reference
이 문제에 관하여(Warning: Xcode alone is not sufficient on Mojave.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ponsuke0531/items/10bca8aee7534bdefa1f텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)