boxen / our-boxen

Copy me for your team.
https://github.com/boxen/our-boxen/
MIT License
2.58k stars 884 forks source link

Default config install fails on new machine #840

Closed texasviking closed 6 years ago

texasviking commented 7 years ago

New MacBook Pro MacOS 10.12.3

This is a brand new machine, straight out of the box. Installed App Store updates, command line tools, and added ssh key for GitHub.

Here is the excerpt of ./script/boxen output where the errors happen:


Error: Could not set 'file' on ensure: No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/dnsmasq.rb20170201-568-5mesjg.lock at 16:/opt/boxen/repo/shared/homebrew/manifests/formula.pp
Error: Could not set 'file' on ensure: No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/dnsmasq.rb20170201-568-5mesjg.lock at 16:/opt/boxen/repo/shared/homebrew/manifests/formula.pp
Wrapped exception:
No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/dnsmasq.rb20170201-568-5mesjg.lock
Error: /Stage[main]/Dnsmasq/Homebrew::Formula[dnsmasq]/File[/usr/local/Library/Taps/boxen/homebrew-brews/dnsmasq.rb]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/dnsmasq.rb20170201-568-5mesjg.lock at 16:/opt/boxen/repo/shared/homebrew/manifests/formula.pp
Error: Could not set 'file' on ensure: No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/git.rb20170201-568-e4e147.lock at 16:/opt/boxen/repo/shared/homebrew/manifests/formula.pp
Error: Could not set 'file' on ensure: No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/git.rb20170201-568-e4e147.lock at 16:/opt/boxen/repo/shared/homebrew/manifests/formula.pp
Wrapped exception:
No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/git.rb20170201-568-e4e147.lock
Error: /Stage[main]/Git/Homebrew::Formula[git]/File[/usr/local/Library/Taps/boxen/homebrew-brews/git.rb]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/git.rb20170201-568-e4e147.lock at 16:/opt/boxen/repo/shared/homebrew/manifests/formula.pp
Error: Could not set 'file' on ensure: No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/hub.rb20170201-568-1glwq9r.lock at 16:/opt/boxen/repo/shared/homebrew/manifests/formula.pp
Error: Could not set 'file' on ensure: No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/hub.rb20170201-568-1glwq9r.lock at 16:/opt/boxen/repo/shared/homebrew/manifests/formula.pp
Wrapped exception:
No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/hub.rb20170201-568-1glwq9r.lock
Error: /Stage[main]/Hub/Homebrew::Formula[hub]/File[/usr/local/Library/Taps/boxen/homebrew-brews/hub.rb]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory - /usr/local/Library/Taps/boxen/homebrew-brews/hub.rb20170201-568-1glwq9r.lock at 16:/opt/boxen/repo/shared/homebrew/manifests/formula.pp
Notice: /Stage[main]/Dnsmasq/File[/opt/boxen/data/dnsmasq]/ensure: created
Error: /Stage[main]/Homebrew::Repo/Homebrew_repo[/usr/local]: Could not evaluate: Execution of '/usr/bin/git rev-parse HEAD' returned 128: fatal: Not a git repository (or any of the parent directories): .git
Notice: /Package[boxen/brews/hub]: Dependency Homebrew_repo[/usr/local] has failures: true```

Thoughts?
jacobbednarz commented 7 years ago

Notice: /Package[boxen/brews/hub]: Dependency Homebrew_repo[/usr/local] has failures: true looks to be the issue here. Everything else seems to be stemming from it.

Does that homebrew directory exist?

texasviking commented 7 years ago

/usr/local/Homebrew Exists, and is a git repo.

texasviking commented 7 years ago

/usr/local/Library does not exist though.

texasviking commented 7 years ago

@jacobbednarz re-running resolved issue. Not sure if it failed at creating that directory the first time through.

gabriel403 commented 7 years ago

I also had this same problem, as @texasviking said re-running resolved it

rudymccomb commented 7 years ago

I too had the same problem @texasviking is correct re-running does fix the issue

ClashTheBunny commented 7 years ago

My guess is that it's an issue with brew --version:

Error: Execution of 'brew tap homebrew/versions' returned 1: ==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
  http://docs.brew.sh/Analytics.html
jacobbednarz commented 7 years ago

@ClashTheBunny If that is the case, I'd welcome a PR to enable export HOMEBREW_NO_ANALYTICS=1 as the default when installing for the first time.

jacobbednarz commented 6 years ago

Closing this issue but if anyone is interested to open a PR with the changes mentioned here, I'll gladly review it.