Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Time Machine migration doctor Error. Foo failed to build on 10.8.3 #19006

Closed
kaplan opened this issue Apr 6, 2013 · 3 comments
Closed

Time Machine migration doctor Error. Foo failed to build on 10.8.3 #19006

kaplan opened this issue Apr 6, 2013 · 3 comments

Comments

@kaplan
Copy link

kaplan commented Apr 6, 2013

I used Time Machine to restore from a back up and when I try and run brew doctor on the new MacBook Pro I get this error:

~ > brew doctor
Error: uninitialized constant Hardware::MacCPUs
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/hardware.rb:33
/usr/local/Library/Homebrew/formula.rb:6:in `require'
/usr/local/Library/Homebrew/formula.rb:6
/usr/local/Library/Homebrew/cmd/missing.rb:1:in `require'
/usr/local/Library/Homebrew/cmd/missing.rb:1
/usr/local/Library/Homebrew/cmd/doctor.rb:1:in `require'
/usr/local/Library/Homebrew/cmd/doctor.rb:1
/usr/local/Library/brew.rb:51:in `require'
/usr/local/Library/brew.rb:51:in `require?'
/usr/local/Library/brew.rb:86

I did brew update before I ran brew doctor

I ran brew --config as I tried to run through the Troubleshooting suggestions. brew cleanup gives the same result.

~ > brew --config
Error: uninitialized constant Hardware::MacCPUs
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/hardware.rb:33
/usr/local/Library/Homebrew/cmd/--config.rb:1:in `require'
/usr/local/Library/Homebrew/cmd/--config.rb:1
/usr/local/Library/brew.rb:51:in `require'
/usr/local/Library/brew.rb:51:in `require?'
/usr/local/Library/brew.rb:86

When I was googling the error I found a recent issue that suggested to run git status on the /usr/local, this is what I have for that command:

~ > cd /usr/local
/usr/local (master)> git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   Library/Homebrew/os/linux/hardware.rb
#   modified:   Library/Homebrew/os/mac/hardware.rb
#
no changes added to commit (use "git add" and/or "git commit -a")

~ > which brew
/usr/local/bin/brew

In my efforts to move over to the new MBPro, the previous attempt I did a migration of just the user, had the same result on the brew doctor, so I uninstalled homebrew and reinstalled, but before I started to replace all my packages I thought I'd try a Restore from Time Machine.

Any suggestions so I can get back to the doctor saying I'm ok and raring to go?

Kind regards.

@MikeMcQuaid
Copy link
Member

Have you tried running brew update or git pull?

@jacknagel
Copy link
Contributor

Failing that, reinstall Homebrew (you don't have to remove the Cellar or any packages to do this)

@kaplan
Copy link
Author

kaplan commented Apr 6, 2013

Thanks guys! I'm raring to brew now. The git pull worked, but (I think) it was after I did a git add, I was trying a different things so I'm not sure what worked. I should have kept better track of what I was doing.

I decided I'd wipe the drive and start over having made a mess, figured a clean start with this info would be good.

I did an erase and reinstall using a boot drive with Mountain Lion and a user migration using a drive with Time Machine. After that was done I ran brew update, that worked, but the brew doctor gave me the same error as expected. The same two files were listed as modified when I did a git status on the /usr/local
# modified: Library/Homebrew/os/linux/hardware.rb
# modified: Library/Homebrew/os/mac/hardware.rb

When I did the git pull I got the following, not sure exactly what to do. I tried a reset as mentioned in the #18732 issue.

/usr/local (master)> git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
    git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
    git branch --set-upstream-to=origin/<branch> master  
/usr/local (master)> git reset --hard origin/master
HEAD is now at acc21e7 Add Kickstarter supporters file.

Then after installing the CLT I ran brew doctor and got:

/usr/local (master)> brew doctor
Your system is raring to brew.

To finish, so far, I ran brew update

/usr/local (master)> brew update
Updated Homebrew from acc21e70 to 0520c36e.
==> Updated Formulae
macvim       rrdtool

Then one more brew doctor and all good still.

Thanks, It's good to know I can do a reinstall without having to remove the Cellar, that's what seemed tedious... having to reinstall the various app/packages in my list, but brew makes it awesome if I had to do it!!

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
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

3 participants