thoughtbot / laptop

A shell script to set up a macOS laptop for web and mobile development.
https://thoughtbot.com
MIT License
8.5k stars 1.91k forks source link

Installation error with Multiple Users #520

Closed Jl14Salvador closed 4 years ago

Jl14Salvador commented 6 years ago

I have downloaded and installed this script on an existing user on a Mac and everything works fine but then when I try to install the zsh shell and rerun the installation on a new user on the same Mac with the same Administrative rights it comes back with permission errors:

Updating Homebrew formulae ...
touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
/usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 520: /usr/local/Homebrew/.git/UPDATE_FAILED: Permission denied
touch: /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/.git/FETCH_HEAD: Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
/usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 520: /usr/local/Homebrew/.git/UPDATE_FAILED: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/FETCH_HEAD: Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
/usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 520: /usr/local/Homebrew/.git/UPDATE_FAILED: Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/.git/FETCH_HEAD: Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
/usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 520: /usr/local/Homebrew/.git/UPDATE_FAILED: Permission denied
/usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 520: /usr/local/Homebrew/.git/UPDATE_FAILED: Permission denied
touch: /usr/local/Homebrew/Library/Taps/thoughtbot/homebrew-formulae/.git/FETCH_HEAD: Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
/usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 520: /usr/local/Homebrew/.git/UPDATE_FAILED: Permission denied
touch: /usr/local/Homebrew/Library/Taps/universal-ctags/homebrew-universal-ctags/.git/FETCH_HEAD: Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
/usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 520: /usr/local/Homebrew/.git/UPDATE_FAILED: Permission denied
fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied
error: could not lock config file .git/config: Permission denied
error: could not lock config file .git/config: Permission denied
error: could not lock config file .git/config: Permission denied
error: could not lock config file .git/config: Permission denied
error: could not lock config file .git/config: Permission denied
error: could not lock config file .git/config: Permission denied
error: could not lock config file .git/config: Permission denied

Already up-to-date.
Using thoughtbot/formulae
Using homebrew/services
Using universal-ctags/universal-ctags
Using caskroom/cask
Using universal-ctags
Using git
Using openssl
Using rcm
Using reattach-to-user-namespace
Using the_silver_searcher
Using tmux
Using vim
Using watchman
Using zsh
Using heroku
Using parity
Using hub
Using imagemagick
Using qt@5.5
Using libyaml
Using coreutils
Using yarn
Using gpg-suite
Using postgres
Using redis
Homebrew Bundle complete! 25 Brewfile dependencies now installed.

Symlink qmake binary to /usr/local/bin for Capybara Webkit...
Error: Permission denied @ unlink_internal - /usr/local/lib/cmake/Qt5
Unlinking /usr/local/Cellar/qt@5.5/5.5.1_1... failed

I'm currently not able to use the new shell installed by the laptop script on the new User on my Mac.

derekprior commented 6 years ago

This isn't a use case we have much reason to support ourselves, but I wonder if something we're doing with the ownership of /usr/local could be better https://github.com/thoughtbot/laptop/blob/master/mac#L51-L59

A google search for "homebrew multiple users" yields many similar problems.

ayoola-solomon commented 6 years ago

I think this might be able to help https://stackoverflow.com/questions/41840479/how-to-use-homebrew-on-a-multi-user-macos-sierra-setup/41842012 @Jl14Salvador

composerinteralia commented 4 years ago

I am going to close this since there hasn't been any activity for a couple years. If this comes up again we can reopen. Thanks!