cloudfoundry / capi-workspace

Machine setup for CAPI developers
Apache License 2.0
8 stars 9 forks source link

On a fresh linux workstation, linuxbrew script fails #22

Closed sethboyles closed 1 year ago

sethboyles commented 3 years ago

We get a failure with this:

Error: /home/linuxbrew/.linuxbrew/Cellar is not writable. You should change the
ownership and permissions of /home/linuxbrew/.linuxbrew/Cellar back to your
user account:
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/Cellar
Skipping Xcode installation for non OSX install
Installing from the Brewfile...
Error: Can't create update lock in /home/linuxbrew/.linuxbrew/var/homebrew/locks!
Fix permissions by running:
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew
brew update failed, but continuing
Error: Can't create update lock in /home/linuxbrew/.linuxbrew/var/homebrew/locks!
Fix permissions by running:
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew
==> Tapping homebrew/bundle
Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-bundle'...
remote: Enumerating objects: 56, done.
remote: Counting objects: 100% (56/56), done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 5355 (delta 26), reused 26 (delta 10), pack-reused 5299
Receiving objects: 100% (5355/5355), 1.20 MiB | 11.11 MiB/s, done.
Resolving deltas: 100% (3130/3130), done.
Tapped 1 command (103 files, 1.7MB).
Error: Can't create update lock in /home/linuxbrew/.linuxbrew/var/homebrew/locks!
Fix permissions by running:
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew
brew bundle can't satisfy your Brewfile's dependencies.
Satisfy missing dependencies with `brew bundle install`.
Error: Can't create update lock in /home/linuxbrew/.linuxbrew/var/homebrew/locks!
Fix permissions by running:
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew
Tapping cloudfoundry/tap
Tapping k14s/tap
Tapping pivotal/tap
Tapping buildpacks/tap
Error: The following directories are not writable by your user:
/home/linuxbrew/.linuxbrew/var/homebrew/locks
You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew/locks
And make sure that your user has write permission.
  chmod u+w /home/linuxbrew/.linuxbrew/var/homebrew/locks
Installing git has failed!
Error: The following directories are not writable by your user:
/home/linuxbrew/.linuxbrew/var/homebrew/locks
You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew/locks
And make sure that your user has write permission.
  chmod u+w /home/linuxbrew/.linuxbrew/var/homebrew/locks
Installing wget has failed!
Error: The following directories are not writable by your user:
/home/linuxbrew/.linuxbrew/var/homebrew/locks
You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew/locks
And make sure that your user has write permission.
  chmod u+w /home/linuxbrew/.linuxbrew/var/homebrew/locks
Installing coreutils has failed!
Error: The following directories are not writable by your user:
/home/linuxbrew/.linuxbrew/var/homebrew/locks
You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew/locks
And make sure that your user has write permission.
  chmod u+w /home/linuxbrew/.linuxbrew/var/homebrew/locks
Installing direnv has failed!
Error: The following directories are not writable by your user:
/home/linuxbrew/.linuxbrew/var/homebrew/locks
You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew/locks
And make sure that your user has write permission.
  chmod u+w /home/linuxbrew/.linuxbrew/var/homebrew/locks
Error: No such keg: /home/linuxbrew/.linuxbrew/Cellar/docker
Installing docker has failed!
Error: The following directories are not writable by your user:
/home/linuxbrew/.linuxbrew/var/homebrew/locks
You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew/locks
And make sure that your user has write permission.
  chmod u+w /home/linuxbrew/.linuxbrew/var/homebrew/locks
Installing kubernetes-cli has failed!

We resolved this with this:

sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/

Maybe we want to add this to the script?

cf-gitbot commented 3 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/175959028

The labels on this github issue will be updated when the story is started.