Command line tools are already installed, use software update to install updates

This morning, I decided to re-install MacOS High Sierra using macOS Recovery by pressing Command + r. The system got stuck when only 11 minutes were remaining.

I restarted it and did the same process again, only this time, it wanted to install OS X Mavericks. I continued installing it. Once OS X Mavericks was installed, I updated it to macOS High Sierra. It said it was installed but it was only downloaded.

I found it was downloaded in /Applications folder and did the install. Everything worked like it should.

I started to install Homebrew, but Command Lines Tools were not installed, and started installing it. Then I saw Command Line Tools update in the App Store, so I cancelled the one initiated by Homebrew and initiated installation from the App Store.

Now, in App Store, it keeps on showing update Command Line Tools for OS X El Capitan and macOS High Sierra.

What should I do?

What you are actually using is the command to install the Xcode command line tools - xcode-select --install. Hence the error message you got - the tools are already installed.

The command you need to update Xcode is softwareupdate command [args ...]. You can use softwareupdate --list to see what's available and then softwareupdate --install -a to install all updates or softwareupdate --install <product name> to install just the Xcode update (if available). You can get the name from the list command.

As it was mentioned in the comments here is the man page for the softwareupdate tool.

2019 Update

A lot of users are experiencing problems where softwareupdate --install -a will in fact not update to the newest version of Xcode. The cause for this is more than likely a pending macOS update (as @brianlmerritt pointed out below). In most cases updating macOS first will solve the problem and allow Xcode to be updated as well.

Updating the Xcode Command Line Tools

A large portion of users are landing on this answer in an attempt to update the Xcode Command Line Tools. The easiest way to achieve this is by removing the old version of the tools, and installing the new one.

sudo rm -rf /Library/Developer/CommandLineTools xcode-select --install

A popup will appear and guide you through the rest of the process.

명령 줄에서 Xcode를 업데이트하려고합니다. 처음에는 달리기를 시도했습니다.

xcode-select --install

이 메시지가 발생했습니다 :

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

따라서 질문은 남아 있습니다. 명령 줄에서 Xcode를 업데이트하는 방법이 있습니까?

답변

실제로 사용중인 것은 Xcode 명령 줄 도구를 설치하는 명령입니다. xcode-select --install 입니다. 따라서 오류 메시지-도구가 이미 설치되어 있습니다.

Xcode를 업데이트해야하는 명령은 softwareupdate command [args ...]입니다. 사용 가능한 항목 softwareupdate --list을 확인한 다음 softwareupdate --install -a모든 업데이트를 설치하거나softwareupdate --install <product name> 를 설치 Xcode 업데이트 만 설치하는 데 사용할 수 있습니다 (사용 가능한 경우). list 명령에서 이름을 얻을 수 있습니다.

주석 에서 언급했듯이 여기softwareupdate 도구에 대한 매뉴얼 페이지가 있습니다.

2019 년 업데이트

많은 사용자들이 softwareupdate --install -a실제로 최신 버전의 Xcode로 업데이트 하지 않는 문제를 겪고 있습니다 . @brianlmerritt가 아래에 지적한 것처럼 이 문제의 원인은 보류중인 macOS 업데이트 일 가능성이 높습니다 . 대부분의 경우 macOS를 먼저 업데이트 하면 문제가 해결되고 Xcode 도 업데이트됩니다.

Xcode 명령 행 도구 업데이트

Xcode 명령 줄 도구 를 업데이트하기 위해 많은 사용자가이 답변에 착륙했습니다 . 이를 수행하는 가장 쉬운 방법은 이전 버전의 도구를 제거하고 새 버전을 설치하는 것입니다.

sudo rm -rf /Library/Developer/CommandLineTools xcode-select --install

팝업이 나타나 나머지 과정을 안내합니다.

답변

나는 같은 문제가 있었고 다음을 수행하여 해결했습니다.

  1. 기존 도구 제거 ($ sudo rm -rf /Library/Developer/CommandLineTools )
  2. xcode 명령 줄 도구를 다시 설치하십시오 ( $ xcode-select --install).

이 단계 후에 새 버전의 도구를 설치하라는 팝업이 표시됩니다.

답변

CLI 버전을 다시 설치하기 위해 전체 버전의 Xcode를 제거 할 때도 같은 문제가 발생했습니다. 내 수정은 :

sudo xcode-select -s /Library/Developer/CommandLineTools

답변

답변

Xcode를 삭제 한 후이 오류가 발생했습니다. 명령 줄 도구 경로를로 재설정하여 문제를 해결했습니다 sudo xcode-select -r.

전에:

navin@Radiant ~$ /usr/bin/clang xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools. See `man xcode-select` for more details. navin@Radiant ~$ xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" to install updates

후:

navin@Radiant ~$ /usr/bin/clang clang: error: no input files

답변

$ sudo rm -rf /Library/Developer/CommandLineTools $ xcode-select --install

답변

@Vel Genov의 답변은 Xcode의 버전이 현재 Mac OS 버전의 최신 버전이므로 업데이트 할 수없는 경우를 제외하고는 정확합니다. 최신 Xcode가있는 경우 (예 : 최신 버전의 iOS가있는 장비에 앱을로드하지 않음) 먼저 Mac OS를 업그레이드해야합니다.

구형 Mac Pro 5.1을 사용하는 나와 같은 사람들을위한 추가 참고 사항. Mojave로 업그레이드하려면 금속 gpu (필자의 경우 사파이어 AMD Radeon RX 560)를 설치해야하지만 HDMI 모니터 만 설치해야합니다 (4K가 아닌 1080 만 해당). 그런 다음에 만 Mojave를 설치하고 펌웨어 업데이트가 필요하다고 말하고 컴퓨터를 종료하십시오. 긴 2 분의 전원 버튼을 누르고 있으면 모든 것이 정상적으로 업그레이드됩니다!

How do I update my command

Procedure to update macOS using command.
Open the terminal application on your macOS (Applications > Utilities > Terminal).
Check for macOS update using the. softwareupdate -l..
Note down available updates names..
Install new updates on macOS using the following command: sudo softwareupdate -i update_pkg_name..

How do I install command

You can install and update each package using Android Studio's SDK Manager or the sdkmanager command line tool. All of the packages are downloaded into your Android SDK directory, which you can locate as follows: In Android Studio, click File > Project Structure. Select SDK Location in the left pane.

How do I know if Apple command

On macOS Sierra (10.12) :.
Run the following command to see if CLT is installed: xcode-select -p. this will return the path to the tool if CLT is already installed. ... .
Run the following command to see the version of CLT: pkgutil --pkg-info=com.apple.pkg.CLTools_Executables..

How do I uninstall command

Xcode includes all your command-line tools. If it is installed on your system, remove it to uninstall your tools. If your tools were downloaded separately from Xcode, then they are located at /Library/Developer/CommandLineTools on your system. Delete the CommandLineTools folder to uninstall them.

Toplist

Neuester Beitrag

Stichworte