macOS Mojave 업데이트 후 Git이 작동하지 않음 (xcrun : 오류 : 잘못된 활성 개발자 경로 (/ Library / Developer / CommandLineTools))
어젯밤 (2018 년 11 월) macOS Mojave로 업데이트했습니다.
오늘 아침 저는 MacBook pro의 명령 줄에서 작업 코드베이스로 이동했습니다.
저장소에 "git status"를 입력하고 오류를 받았습니다.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
문제는 Xcode 명령 줄 도구를 업데이트해야한다는 것입니다.
터미널로 돌아가서 다음을 누르십시오.
xcode-select --install
그러면 다음을 받게됩니다.
xcode-select: note: install requested for command line developer tools
그리고 창에 Xcode 명령 줄 도구를 업데이트하라는 메시지가 표시됩니다.
업데이트가 완료된 후 새 터미널 창을 열면 개발 도구가 반환됩니다.
추가 : 주요 또는 준 주요 업데이트를 사용하면 명령 줄 도구가 다시 제대로 작동하도록 업데이트해야합니다. 업데이트로 Xcode를 확인하십시오. 이것은 모하비를 넘어선 다 ...
그 후 터미널을 다시 시작하십시오.
시도 할 때 업데이트 서버에서 소프트웨어를 사용할 수 없다는 오류가 발생했습니다.
xcode-select --install
나를 위해 수정 한 것은 https://developer.apple.com/download/more/ 로 이동 Command Line Tools (macOS 10.14) for Xcode 10
하여 수동으로 다운로드 한 다음 설치하는 것이 었습니다.
그 후 새 터미널을 열면 오류가 사라집니다.
저 xcode-select --reset
에게는 Mojave의 솔루션이었습니다.
dustbuster의 답변 외에도 다음 명령을 사용하여 Xcode 폴더의 경로를 설정해야했습니다.
sudo xcode-select -switch /Library/Developer/CommandLineTools
나를 위해 일한 것은 다음과 같습니다.
sudo xcode-select --reset
그런 다음 @ High6의 대답과 같습니다.
sudo xcodebuild -license
이것은 내가 Xcode 라이센스라고 가정하는 라이센스를 보여줄 것입니다. space(또는 마우스)를 사용하여 하단으로 스크롤 한 다음을 누릅니다 agree
.
이것은 MacOS Mojave v 10.14에서 나를 위해 일한 것입니다.
오류 메시지에서 Xcode 명령 줄 도구 부분을 알아 냈지만 Xcode를 실행하고 추가 도구를 설치하라는 메시지가 표시되면 설치를 요청했지만 새 터미널을 연 후에도 동일한 오류가 발생했습니다.
그래서 나는 xcode-select --install
수동으로했고 그 후에 그것은 나를 위해 일했습니다.
제 경우에는 xcode에서 확인되지 않았습니다.
다음과 같이 할 수 있습니다 : xcode-> Preferences를 누르고 Locations를 누른 다음 다음 이미지로 선택하십시오.
저에게는 (Mojave OS에) xcode가 설치되어 있지 않았습니다. Mac의 App Store로 이동하여 다운로드 한 다음 터미널로 돌아가 입력 git
하고 Enter 키를 누르면 작동했습니다.
이것은 나를 위해 작동합니다
sudo xcode-select --reset
sudo xcodebuild -license
X 코드를 설치해야합니다.
내 Xcode 버전이 너무 오래되어 명령 줄 도구를 설치하는 것이 도움이되지 않는다는 것을 알았습니다. 내가 한 일은 다음과 같습니다.
- I completely uninstalled the outdated XCode
- I reinstalled the most recent XCode from the app store
- That was all. Git was restored.
Hope this helps someone else...
if you dont have xcode or setup manually without xcode.
- sudo rm -rf /Library/Developer/CommandLineTools
- https://developer.apple.com/download/more/ and downloading Command Line Tools (macOS 10.14) for Xcode 10 and then installing it manually.
- Setup Command Line Tools
Take it be easy
else
- xcode-select --install . enough this.
Try this:
sudo xcode-select --reset
sudo xcodebuild -license
or this:
xcode-select --install
For those using Catalina and Xcode-beta:
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
For me It happened after Mac OS update to Mojave and git was not functioning in Intellij
Solution:- Go to Settings, then File | Settings | Version Control | Git and edit Path to Git executable field which is /usr/local/bin/git
'developer tip' 카테고리의 다른 글
JavaScript에서 배열의 최소 / 최대 요소 찾기 (0) | 2020.09.30 |
---|---|
Python의 easy_install로 설치된 패키지를 제거하려면 어떻게해야합니까? (0) | 2020.09.30 |
입력 유형 = "날짜"형식을 변경하는 방법이 있습니까? (0) | 2020.09.30 |
클래스 JSON을 직렬화 가능하게 만드는 방법 (0) | 2020.09.30 |
Pandas DataFrame에 한 행 추가 (0) | 2020.09.30 |