Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to High Sierra, reinstalled brew, now can't upgrade/install any packages - Your Command Line Tools are too outdated. #4101

Closed
5 tasks done
speedyseal opened this issue Apr 21, 2018 · 12 comments

Comments

@speedyseal
Copy link

speedyseal commented Apr 21, 2018

  • are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new. If it's a brew cask problem please file this issue at https://github.com/caskroom/homebrew-cask/issues/new. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?

Cannot brew install or upgrade any packages.

e.g.

$ brew install mongodb
Error: Your Command Line Tools are too outdated.
Update them from Software Update in the App Store.
$ 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: Your Command Line Tools are too outdated.
Update them from Software Update in the App Store.


Warning: A newer Command Line Tools release is available.
Update them from Software Update in the App Store.

I had upgraded to High Sierra. Then reinstalled brew using /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/Frameworks
/usr/local/sbin
==> The Xcode Command Line Tools will be installed.

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Frameworks /usr/local/sbin
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Frameworks /usr/local/sbin
==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown dyeh /usr/local/Frameworks /usr/local/sbin
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Frameworks /usr/local/sbin
==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown dyeh /Library/Caches/Homebrew
==> Searching online for the Command Line Tools
==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> Installing Command Line Tools (macOS El Capitan version 10.11) for Xcode-8.2
==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command\ Line\ Tools\ (macOS\ El\ Capitan\ version\ 10.11)\ for\ Xcode-8.2
Software Update Tool


Downloading Command Line Tools (macOS El Capitan version 10.11) for Xcode
Downloaded Command Line Tools (macOS El Capitan version 10.11) for Xcode
Installing Command Line Tools (macOS El Capitan version 10.11) for Xcode
Done with Command Line Tools (macOS El Capitan version 10.11) for Xcode
Done.
==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
==> Downloading and installing Homebrew...
HEAD is now at 1d9746d Merge pull request #4092 from MikeMcQuaid/x11_requirement_download_base
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/dyeh/Library/Caches/Homebrew...
==> Deleting /Library/Caches/Homebrew...
Already up-to-date.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics.html

The installer installed an old version of CLT. Subsequently brew fails to install any package, with the message "Error: Your Command Line Tools are too outdated."

App store doesn't show any newer CLT to install. I updated Xcode to 9.3. I cannot find any place in Xcode to download its corresponding CLT.

The brew installation script shouldn't be installing an old version of CLT that it later complains is too old and exits.

@MikeMcQuaid
Copy link
Member

Run xcode-select --install. If that doesn't fix it: download them from http://developers.apple.com/downloads/

@speedyseal
Copy link
Author

xcode-select didn’t help

To help people in the future who encounter this.
If you upgrade to high sierra you will encounter permissions errors in /usr/local

Reinstall brew using the usual command for installing from scratch /usr/bin/ruby...

The installer will blow away your old CLT with an old one so you will have to update Xcode and search the Apple developer downloads for the corresponding CLT. It may not be obvious where to find it. The above link has it.

@ghost
Copy link

ghost commented May 9, 2018

@speedyseal
same with me...

i am on xcode 9.2 and brew doctor tells me ..

x-MacBook-Pro:~ apple$ 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: Your Xcode (9.2) is outdated.
Please update to Xcode 9.3 (or delete it).
Xcode can be updated from the App Store.

So, xcode-select does nothing.
SO then softwareupdate --list gives me nothing too.

Should i just ignore it i wonder and wait for homebrew to get updated ?

@nitriques
Copy link

nitriques commented May 23, 2018

I've been having the same issue for months now.

I've brew update and even pulled in master via git, no issues, but brew upgrade says Your Command Line Tools are too outdated.

There are nothing in brew doctor (except the same warning).

There is nothing in softwareupdates.

I do have xcode-select version 2349, installed from https://developer.apple.com/download/more/ (CLT tools for Xcode 9.3).

I've tried xcode-select -r and I stay on the same version.

@ghost
Copy link

ghost commented May 23, 2018

x-MacBook-Pro:MacOS apple$ 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: Your Xcode (9.2) is outdated.
Please update to Xcode 9.3 (or delete it).
Xcode can be updated from the App Store.

x-MacBook-Pro:MacOS apple$ 

So its telling me to ignore so i will :)

@nitriques
Copy link

I had to delete a plist from /System/Library/Receipts/com.apple.pkg.CLTools_Executables.* (needed to disable sip for that) and then brew upgrade worked for almost everything, except python, where it complains (again) about not have the command line tools... urg....

I've tried to poke at the code, but it gets stash when I run brew upgrade and was not able to turn it off !!!

@nitriques
Copy link

The problem seems to be that line:

raise BuildToolsError, [formula]

@nitriques
Copy link

I do have both /usr/bin/clang and /usr/bin/gcc

@rpranshu
Copy link

Are you still facing this issue? @nitriques
If yes then post the CLI request and response, maybe i can help
regards

@nitriques
Copy link

@rpranshu Yes I do, thanks for asking !

$ brew update
# OK !

$ brew upgrade git
# OK !

$ brew upgrade python
==> Upgrading 1 outdated package, with result:
python 3.6.4_2 -> 3.6.5
==> Upgrading python 
Error: The following formula:
  python
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:
  xcode-select --install

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

$ xcode-select -v
xcode-select version 2349.

$ xcode-select -p
/Library/Developer/CommandLineTools

$ 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

I do not have xcode anymore. Do you want anything else ?

@rpranshu
Copy link

@nitriques

After reading the query, i have 2 conclusions:

  1. There might be a PATH issue, i.e. Homebrew might not be able to find the right path to the dev tools of xcode,

  2. Secondly, run brew reinstall python . This will solve the python issue

PS
If (1.) doesn't work then do the following:
sudo rm -rf /Library/Developer/CommandLineTools. This will uninstall cli tools by xcode. then again try xcode-select --install (optionally add sudo before the command)

WARNING!! Please do make a backup of the CommandLineTools folder!

@MikeMcQuaid
Copy link
Member

Please file a reproducible bug if there is one otherwise take this conversation to our Discourse or somewhere else, thanks.

@Homebrew Homebrew locked as resolved and limited conversation to collaborators May 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants