Xcode-명령 행 도구 설치
현재 Xcode / Mac OS X v10.8 (Mountain Lion) 이상과 함께 설치된 명령 줄 빌드 도구를 얻으려면 어떻게해야합니까?
Xcode와 달리 설치 프로그램이 없습니다 (단지 번들입니다).
모든 명령 행 도구가 번들 (내용 / 개발자 아래)에있는 것처럼 보이지만이를 사용하도록 설정된 적절한 환경 변수는 없습니다.
명령 줄에서 빌드를 지원하도록 환경을 설정하는 스크립트가 있습니까?
Xcode 5.1 및 OSX 10.9. (Xcode 5.1.1 + OSX 10.10에서도 작동)
xcode-select --install
버전 2333과 함께 작동하고 버전 2003과 함께 실패했습니다. 따라서 xcode-select --install
아래 설명대로 다운로드가 작동하지 않는 경우 시도하십시오 .
2014 년 2 월 초에 xcode-select --install
"소프트웨어 업데이트 서버에서 현재 소프트웨어를 사용할 수 없으므로 소프트웨어를 설치할 수 없습니다"라고보고되었습니다. 2014 년 2 월 말이 명령은 도움말 만 표시하기 시작했습니다. 솔루션을 직접 다운로드 아래의 "별도의 다운로드"를 참조하는 것입니다.
Xcode 5.0.1 및 OSX 10.9
Xcode 5.0.1 및 Mavericks 10.9에서는 Xcode를 통해 더 이상 명령 줄 도구를 사용할 수 없습니다. 대신 Apple 개발자 도구 사이트 ( https://developer.apple.com/downloads/index.action) 에서 다운로드해야합니다 . 이를 위해서는 개발자 계정으로 로그인해야합니다.
또는 터미널을 통해 (릴리스 문서에서) : " xcode-select --install "을 사용하여 명령 줄 개발자 도구 패키지를 설치할 수 있으며 설치된 도구는 소프트웨어 업데이트를 사용하여 자동으로 업데이트됩니다.이 기능을 사용하려면 OS X 10.9가 필요합니다. 이전 버전의 경우 Xcode에서 인앱 다운로드를 계속 사용하십시오.
터미널에서 명령을 실행하면 다음과 같은 GUI가 생성됩니다.
인사이드 Xcode (5.0)
Xcode에는 명령 줄 도구 및 이전 iOS 시뮬레이터와 같은 선택적 구성 요소를 설치할 수있는 새로운 "다운로드"환경 설정 창이 포함되어 있습니다. 이 패널을 열려면 화면 왼쪽 상단의 Apple 로고 옆에있는 "Xcode"버튼을 클릭 한 다음 "기본 설정"을 클릭하고 "다운로드"를 클릭하십시오.
Xcode 5.0 스크린 샷 :
Xcode 4.x 스크린 샷 :
별도 다운로드
Xcode가없는 경우 Apple에서 별도로 다운로드하여 사용할 수 있습니다.
developer.apple.com/downloads/index.action 사이트로 이동 하여 Apple ID (무료)로 로그인하십시오. 왼쪽 창에서 "명령 줄 도구"를 검색하고 사용중인 OS X 버전에 적합한 패키지를 선택하십시오. Mac OS X 10.7.3 이상이 필요합니다.
커맨드 라인 도구를 가져 오는 동안 "콘솔"을 살펴보면 실제로 Mountain Lion 커맨드 라인 도구에 "비공식"링크가 있다는 것을 알 수 있습니다!
그래서 시도하십시오 :
http://adcdownload.apple.com/ios/ios_simulator__resigned/cltools_mountainliondp2_march12.dmg
내 콘솔 로그는 다음과 같습니다.
01/04/2012 15:41:54.258 Xcode: [MT] DVTDownloadable: Download failed. Downloadable: {
dependencies = (
);
fileSize = 141452226;
identifier = "Xcode.CLTools.10.8";
name = "Command Line Tools";
source = "http://adcdownload.apple.com/ios/ios_simulator__resigned/cltools_mountainliondp2_march12.dmg";
userInfo = {
ActivationPredicate = "$MAC_OS_X_VERSION >= '10.8.0' && $MAC_OS_X_VERSION < '10.9.0'";
InstallPrefix = "/";
InstalledIfAllSHA1SumsMatch = {
"/usr/bin/clang" = 600c35175775a6002452a88f17e00c570cd2e2d0;
};
Summary = "Before installing, note that from within Terminal you can use the XCRUN tool to launch compilers and other tools embedded within the Xcode application. Use the XCODE-SELECT tool to define which version of Xcode is active. Type \"man xcrun\" from within Terminal to find out more.\n\nDownloading this package will install copies of the core command line tools and system headers into system folders, including the LLVM compiler, linker, and build tools.";
"Xcode.SDKs" = (
);
};
version = "1.1.1";
}. Error: Error Domain=NSCocoaErrorDomain Code=3840 "The data couldn’t be read because it has been corrupted." (Encountered unknown ampersand-escape sequence at line 18) UserInfo=0x401bc8e60 {NSDebugDescription=Encountered unknown ampersand-escape sequence at line 18, kCFPropertyListOldStyleParsingError=The data couldn’t be read because it has been corrupted.}
"비공식"링크는
http://developer.apple.com/downloads/
및 403 : 금지 된 자격을 갖춘 개발자 계정으로 로그인하지 않는. 무료 계정은 시험판 소프트웨어 및 전체 OS 설치를 제외한 모든 것에 액세스 할 수 있습니다. 특히 Xcode 4.4 릴리스 ( "2012 년 7 월"패키지)와 일치하는 명령 줄 도구 패키지는 7 월 27 일 Lion 및 Mountain Lion에 게시되었습니다.
로그 파일, 딥 링크 웹 페이지 및 Xcode 기본 설정 창과 달리이 페이지는 Xcode에서 번들로 제공되지 않은 다른 모든 것 (오디오 도구, 접근성 도구 등)을 포함하여 무료 및 유료 개발자 모두에게 유용한 다른 많은 다운로드로 연결됩니다. .), OS X 커널 디버그 빌드 및 1.0 버전의 Xcode 릴리스.
다음은 Apple Developer Server에있는 명령 줄 도구에 대한 링크입니다. 액세스하려면 Apple 개발자 (유료 / 프리미엄) 계정이 필요할 수 있습니다. 최신 (안정적 및 베타) Xcode 도구를 다운로드 할 수 있습니다. (장치 확인이 필요하지 않습니다. 명령 줄 도구를 선택하는 동안 macOS 및 XCode Tool / SDK 버전 만 확인하십시오)
Xcode 11
Xcode 10
엑스 코드 10.1
- (- 맥 OS 10.14를위한 명령 줄 도구 (엑스 코드 10.1))
- (명령 줄 도구 (엑스 코드 10.1) - 맥 OS 10.13 용)엑스 코드 (10)
- (명령 행 도구 (엑스 코드 10) - 맥 OS 10.14 용)
- (명령 줄 도구 (엑스 코드 10) - 맥 OS 10.13 용)Xcode 9
- 엑스 코드 9.2
- (- 맥 OS 10.13를위한 명령 줄 도구 (엑스 코드 9.2))
- (명령 줄 도구 (엑스 코드 9.2) - 맥 OS 10.12 용)- 엑스 코드 9.1
- (- 맥 OS 10.13를위한 명령 줄 도구 (엑스 코드 9.1))
- (명령 줄 도구 (엑스 코드 9.1) - 맥 OS 10.12 용)엑스 코드 9.0.1
- (- 맥 OS 10.13를위한 명령 줄 도구 (엑스 코드 9.0.1))
- (명령 줄 도구 (엑스 코드 9.0.1) - 맥 OS 10.12 용)엑스 코드 9.0
- (명령 행 도구 (엑스 코드 9) - 맥 OS 10.12 용)
- (명령 줄 도구 (엑스 코드 9) - 맥 OS 10.13 용)
시스템에 최신 명령 줄 도구가 설치되면 Xcode 메뉴에서 설정하십시오.
(Xcode 메뉴 항목) Xcode ▶ 기본 설정 ▶ 위치 ▶ 명령 줄 도구 ▶ 적절한 명령 줄 도구 선택
Apple의 명령 줄 도구 "공식"빌드를 설치하는 대신 여기에서 Kenneth의 빌드를 설치할 수도 있습니다.
https://github.com/kennethreitz/osx-gcc-installer
명령 행 도구 만 있으면 XCode가 필요하지 않습니다.
If you want to use the version of tools provided in XCode itself you can use xcrun (e.g. xcrun git
). From the help at the bottom of the download preference pane:
note that from within Terminal you can use the XCRUN tool to launch compilers and other tools embedded within the Xcode application. Use the XCODE-SELECT tool to define which version of Xcode is active. Type "man xcrun" from within Terminal to find out more.
I recently had to install Xcode command line tools on Mountain Lion over SSH.
Notice: I imagine this process would work identically for any version of Xcode or OSX. Just make sure you get your paths correct.
Here's how I did it...
If you don't have a free Apple developer account, register for one
Download the "Command Line Tools for Xcode" appropriate for your version of OSX
For me, that was "Command Line Tools (OS X Mountain Lion) for Xcode - April 2014"
Copy the dmg file to your remote
In the following command, I'm using scp to securely copy the file from my local computer to the remote named
remote
$ scp ~/Downloads/command_line_tools_for_osx_mountain_lion_april_2014.dmg remote:Downloads/
ssh to your remote
$ ssh remote
mount the dmg file on the remote
Here, I'm using hdiutil to mount the image
$ hdiutil attach ~/Downloads/command_line_tools_for_osx_mountain_lion_april_2014.dmg
install the package contained in the dmg
Here, installer must be run with
sudo
because this package needs to be installed on the root file system$ cd /Volumes/Command\ Line\ Tools\ \(Mountain\ Lion\) $ sudo installer -pkg Command\ Line\ Tools\ \(Mountain\ Lion\).mpkg -target /
unmount the dmg file
$ hdiutil detach /Volumes/Command\ Line\ Tools\ \(Mountain\ Lion\)
delete the dmg file from the remote; optional
I see no purpose keeping it around, but you can if you want.
$ rm ~/Downloads/command_line_tools_for_osx_mountain_lion_april_2014.dmg
UPDATED: On Lion 10.7.4 the Command Line Tools are already available from withing XCode. You can get it freely from App Store.
The GCC for OSX won't compile some packages obtained from macports. https://github.com/kennethreitz/osx-gcc-installer/downloads
You can automate the installation of Command-Line Tools in bash. I needed to do this when I was automating the developer onboarding setup process.
xcode-select --install && sleep 1
osascript -e 'tell application "System Events"' -e 'tell process "Install Command Line Developer Tools"' -e 'keystroke return' -e 'click button "Agree" of window "License Agreement"' -e 'end tell' -e 'end tell'
try going into Xcode > Preferences... > Downloads and clicking the button with a downward arrow in a circle next to command line tools.
xcode command line tools can be downloaded from here: https://developer.apple.com/downloads/index.action#
April 2014 version direct download link (for developers who just want to get started right away) https://developer.apple.com/downloads/download.action?path=Developer_Tools/command_line_tools_os_x_mavericks_for_xcode__april_2014/command_line_tools_for_osx_mavericks_april_2014.dmg
How do I get the command line builds tools installed with Xcode 4.4 / Mac OS X v10.8 (Mountain Lion) or later?
For OS X 10.9, you simply install Xcode. The Command Line Tools are bundled with Xcode. From Technical Note TN2339, Building from the Command Line with Xcode FAQ:
Downloading command-line tools is not available in Xcode for OS X 10.9. How can I install them on my machine?
In OS X 10.9, the Downloads pane of Xcode Preferences does not support downloading command-line tools. Use any of the following methods to install command-line tools on your system:
If Xcode is installed on your machine, then there is no need to install them. Xcode comes bundled with all your command-line tools. OS X 10.9 includes shims or wrapper executables. These shims, installed in /usr/bin, can map any tool included in /usr/bin to the corresponding one inside Xcode. xcrun is one of such shims, which allows you to find or run any tool inside Xcode from the command line. Use it to invoke any tool within Xcode from the command line. ...
- Visit the apple More Downloads for Apple Developers page (log in if you're not logged in)
- Expand the
Command Line Tools
row with appropriate MacOS Version (we can always view the macOS version from Top Bar > Click on Apple icon >About This Mac
> viewVersion
) - 해당
.dmg
파일 다운로드Command Line Tools
(스크린 샷 첨부) .dmg
파일이 다운로드 되면 파일을 두 번 클릭하여 설치할 수 있습니다
참고 URL : https://stackoverflow.com/questions/9329243/xcode-install-command-line-tools
'Programing' 카테고리의 다른 글
Ruby on Rails에서 DateTime, Timestamp, Time 및 Date의 차이점은 무엇입니까? (0) | 2020.02.22 |
---|---|
C #에서 "내부"키워드의 실제 사용 (0) | 2020.02.22 |
Rake 작업 내에서 Rake 작업을 실행하는 방법은 무엇입니까? (0) | 2020.02.22 |
삭제 된 원격 브랜치로 원점에서 가져 오시겠습니까? (0) | 2020.02.22 |
파이썬 소스에서 UTF-8 인코딩으로 작업하기 (0) | 2020.02.22 |