Qt Creator-프로젝트 오류 : Xcode가 올바르게 설정되지 않았습니다. / usr / bin / xcodebuild를 실행하여 라이센스 계약을 확인해야 할 수도 있습니다.
방금 Qt 5.5를 설치했고 OS X에서 처음으로 Qt Creator를 사용하고 있습니다. Qt를 처음 설치할 때 이상한 것으로 생각되는 오류 메시지 'Xcode 5 not installed'(Xcode 7 베타가 있음)가 표시되었습니다. 그러나 설치는 성공적으로 완료되었습니다.
이제 프로젝트를 시작하거나 열면 오류가 발생합니다.
프로젝트 오류 : Xcode가 올바르게 설정되지 않았습니다. / usr / bin / xcodebuild를 실행하여 라이센스 계약을 확인해야 할 수도 있습니다.
내가 실행하면 /usr/bin/xcodebuild
터미널에, 나는 다음을 얻을 :
xcode-select : error : 도구 'xcodebuild'에는 Xcode가 필요하지만 활성 개발자 디렉토리 '/ Library / Developer / CommandLineTools'는 명령 행 도구 인스턴스입니다.
크로스 플랫폼 호환성을 위해 라이브러리에 액세스하는 것과 관련이 없다면 Xcode가 Qt Creator와 어떤 관련이 있는지 잘 모르겠지만이 문제를 해결할 방법이 있습니까?
> = Xcode 8
Bruce가 말한 것처럼 Xcode 8에서는 Qt가 xcrun
언제 찾아야 하는지 찾으려고 할 때 발생합니다 xcodebuild
.
파일을여십시오 :
Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
바꾸다:
isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))
와:
isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))
~> Xcode 8
Xcode 8 이전에는 Xcode를 설치 한 후 명령 줄 도구를 설치할 때이 문제가 발생합니다. 무엇 발생하면입니다 Xcode-select
디렉토리로 지적됩니다 개발자 /Library/Developer/CommandLineTools
.
포인트 Xcode-select
명령으로 올바른 엑스 코드 개발자 디렉토리 :
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
다음 명령으로 라이센스 계약을 확인하십시오.
sudo xcodebuild -license
라이센스 계약서를 읽으라는 메시지가 표시됩니다.
agree
약관에 동의하면 입력하십시오 .
내용을 변경하면 Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
예를 들어 데스크탑 키트에서만 작동합니다. 모의 실험 장치.
더 좋은 방법은 심볼릭 링크를 만드는 것입니다.
cd /Applications/Xcode.app/Contents/Developer/usr/bin/
sudo ln -s xcodebuild xcrun
따라서 모든 대상에 대해 .prf 파일을 변경할 필요가 없습니다.
이것은 트릭을 할 것입니다 :
#sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
이것을 터미널에서 실행하십시오.
Xcode 8 사용자에게는 또 다른 문제가 있습니다. Qt 5.7.1이 출시 될 때까지 임시 솔루션을 보려면 여기를 참조하십시오.
https://forum.qt.io/topic/71119/project-error-xcode-not-set-up-properly
요약하면 다음과 같습니다.
Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
텍스트 편집기에서 열고 다음 을 바꾸십시오.
isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))))
이것으로 :
isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))
XCode 8.x를 사용하여 소스에서 Qt를 빌드하는 경우 qt-everywhere-enterprise-src-5.7.0/qtbase/configure
551 행 의 파일에서 "-find"인수를 다음과 같이 변경해야합니다.
if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
Xcode 정식 버전을 설치하고 약관에 동의 한 다음를 사용하여 문제를 해결했습니다 xcode-select --reset
.
Basically the problem is that the xcode you're pointing at /Library/Developer/CommandLineTools
doesn't allow you to accept the terms & conditions. So after the install & resetting the location, all should be OK
For me, the only way to work correctly is to commenting the lines about xcrun with the '#':
# Make sure Xcode is set up properly
#isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \
#error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")
At the file: Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
Just to add a bit to a lot of old answers in the spirit of "This worked for me" I found that by launching Xcode, logging in to my developer account (just a free one) and then setting the Command tools in "Locations". I could get the
'sudo /usr/bin/xcodebuild -license agree'
to work. i.e. it launched an agree process in the command line and I agreed after careful reading of all 14 squillion pages of stuff.
I did not have to edit anything.
My system is Mojave 10.14.6 and Xcode 10.3 (10G8).
'IT박스' 카테고리의 다른 글
다음 클래스를 찾을 수 없습니다 : android.support.v7.internal.app.WindowDecorActionBar (0) | 2020.07.22 |
---|---|
EJB 3.1과 CDI는 어디에 사용합니까? (0) | 2020.07.22 |
치명적인 오류 : AST 파일이 잘못되었거나 손상되었습니다.-Xcode (0) | 2020.07.22 |
T-SQL을 사용하여 하위 문자열의 마지막 항목 색인 찾기 (0) | 2020.07.22 |
왜 SQL을 좋아하지 않습니까? (0) | 2020.07.22 |