Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.95k stars 10.73k forks source link

Permission denied `brew install Caskroom/cask/google-cloud-sdk` #18974

Closed patsplat closed 8 years ago

patsplat commented 8 years ago

Description of issue

Any workarounds?

WAS:

$ brew install Caskroom/cask/google-cloud-sdk
==> brew cask install Caskroom/cask/google-cloud-sdk
Error: Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/nokogiri-1.6.6.2/gem_make.out
$ 

brew update; brew cleanup; brew cask cleanup reported a different error

$ brew update; brew cleanup; brew cask cleanup
Already up-to-date.
Warning: Skipping boost: most recent version 1.60.0_1 not installed
Warning: Skipping cairo: most recent version 1.14.6_1 not installed
Warning: Skipping ffmpeg: most recent version 2.8.6 not installed
Warning: Skipping fontconfig: most recent version 2.11.1_2 not installed
Warning: Skipping freetype: most recent version 2.6.3 not installed
Warning: Skipping git: most recent version 2.7.1 not installed
Warning: Skipping imagemagick: most recent version 6.9.3-0_2 not installed
Warning: Skipping mysql: most recent version 5.7.11 not installed
Warning: Skipping node: most recent version 5.6.0 not installed
Warning: Skipping openssl: most recent version 1.0.2f not installed
Warning: Skipping opus: most recent version 1.1.2 not installed
Warning: Skipping homebrew/php/php56: most recent version 5.6.18 not installed
Warning: Skipping homebrew/php/php56-imagick: most recent version 3.3.0_1 not installed
Warning: Skipping homebrew/php/php56-mcrypt: most recent version 5.6.18 not installed
Warning: Skipping homebrew/php/php56-pdo-pgsql: most recent version 5.6.18 not installed
Warning: Skipping homebrew/php/phpunit: most recent version 5.2.1 not installed
Warning: Skipping pixman: most recent version 0.34.0 not installed
Warning: Skipping postgresql: most recent version 9.5.1 not installed
Warning: Skipping rtmpdump: most recent version 2.4+20151223 not installed
Warning: Skipping sqlite: most recent version 3.11.0 not installed
Error: No such file or directory - /Library/Caches/Homebrew/Casks
  Most likely, this means you have an outdated version of homebrew-cask. Please run:

      brew uninstall --force brew-cask; brew untap phinze/cask; brew update; brew cleanup; brew cask cleanup

  If this doesn’t fix the problem, please report this bug:

      https://github.com/caskroom/homebrew-cask#reporting-bugs

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:425:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:425:in `foreach'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:425:in `children'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/cleanup.rb:33:in `cache_symlinks'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/cleanup.rb:41:in `cache_incompletes'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/cleanup.rb:70:in `all_cache_files'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/cleanup.rb:74:in `disk_cleanup_size'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/cleanup.rb:10:in `run'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:83:in `run_command'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:121:in `process'
/usr/local/Library/Taps/caskroom/homebrew-cask/cmd/brew-cask.rb:26:in `<top (required)>'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/brew.rb:21:in `require?'
/usr/local/Library/brew.rb:89:in `<main>'
$
$
$
$
$ brew uninstall --force brew-cask; brew untap phinze/cask; brew update; brew cleanup; brew cask cleanup
Error: No available tap phinze/cask.
Already up-to-date.
Warning: Skipping boost: most recent version 1.60.0_1 not installed
Warning: Skipping cairo: most recent version 1.14.6_1 not installed
Warning: Skipping ffmpeg: most recent version 2.8.6 not installed
Warning: Skipping fontconfig: most recent version 2.11.1_2 not installed
Warning: Skipping freetype: most recent version 2.6.3 not installed
Warning: Skipping git: most recent version 2.7.1 not installed
Warning: Skipping imagemagick: most recent version 6.9.3-0_2 not installed
Warning: Skipping mysql: most recent version 5.7.11 not installed
Warning: Skipping node: most recent version 5.6.0 not installed
Warning: Skipping openssl: most recent version 1.0.2f not installed
Warning: Skipping opus: most recent version 1.1.2 not installed
Warning: Skipping homebrew/php/php56: most recent version 5.6.18 not installed
Warning: Skipping homebrew/php/php56-imagick: most recent version 3.3.0_1 not installed
Warning: Skipping homebrew/php/php56-mcrypt: most recent version 5.6.18 not installed
Warning: Skipping homebrew/php/php56-pdo-pgsql: most recent version 5.6.18 not installed
Warning: Skipping homebrew/php/phpunit: most recent version 5.2.1 not installed
Warning: Skipping pixman: most recent version 0.34.0 not installed
Warning: Skipping postgresql: most recent version 9.5.1 not installed
Warning: Skipping rtmpdump: most recent version 2.4+20151223 not installed
Warning: Skipping sqlite: most recent version 3.11.0 not installed
Error: No such file or directory - /Library/Caches/Homebrew/Casks
  Most likely, this means you have an outdated version of homebrew-cask. Please run:

      brew uninstall --force brew-cask; brew untap phinze/cask; brew update; brew cleanup; brew cask cleanup

  If this doesn’t fix the problem, please report this bug:

      https://github.com/caskroom/homebrew-cask#reporting-bugs

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:425:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:425:in `foreach'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:425:in `children'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/cleanup.rb:33:in `cache_symlinks'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/cleanup.rb:41:in `cache_incompletes'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/cleanup.rb:70:in `all_cache_files'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/cleanup.rb:74:in `disk_cleanup_size'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/cleanup.rb:10:in `run'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:83:in `run_command'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:121:in `process'
/usr/local/Library/Taps/caskroom/homebrew-cask/cmd/brew-cask.rb:26:in `<top (required)>'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/brew.rb:21:in `require?'
/usr/local/Library/brew.rb:89:in `<main>'
$

Output of brew cask <command> --verbose

Works now?

$ brew install Caskroom/cask/google-cloud-sdk --verbose
==> brew cask install Caskroom/cask/google-cloud-sdk --verbose
brew cask install Caskroom/cask/google-cloud-sdk --verbose
==> Caveats
google-cloud-sdk is installed at /opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:

      for bash users
        source '/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc'
        source '/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc'

      for zsh users
        source '/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc'
        source '/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc'

      for fish users
        set fish_user_paths /opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin
        set -x MANPATH /opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/help/man /usr/local/share/man /usr/share/man /opt/x11/share/man

        Run fish_update_completions to generate completions for fish based on the man pages

==> Downloading https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz
/usr/bin/curl -fLA Homebrew-cask v0.51+ (Ruby 2.0.0-645) https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz -C 0 -o /Library/Caches/Homebrew/google-cloud-sdk-latest.tar.gz.incomplete
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3843k  100 3843k    0     0  3463k      0  0:00:01  0:00:01 --:--:-- 3465k
==> No checksum defined for Cask google-cloud-sdk, skipping verification
==> Running installer script google-cloud-sdk/install.sh
==> Welcome to the Google Cloud SDK!
==> 
==> This will install all the core command line tools necessary for working with
==> the Google Cloud Platform.
==> 
==> +----------------------------------------------------------------------------+
==> |                    These components will be installed.                     |
==> +-----------------------------------------------------+------------+---------+
==> |                         Name                        |  Version   |   Size  |
==> +-----------------------------------------------------+------------+---------+
==> | BigQuery Command Line Tool                          |     2.0.18 | < 1 MiB |
==> | BigQuery Command Line Tool (Platform Specific)      |     2.0.18 | < 1 MiB |
==> | Cloud SDK Core Libraries (Platform Specific)        | 2016.02.05 | < 1 MiB |
==> | Cloud Storage Command Line Tool                     |       4.16 | 2.6 MiB |
==> | Cloud Storage Command Line Tool (Platform Specific) |       4.15 | < 1 MiB |
==> | Default set of gcloud commands                      |            |         |
==> +-----------------------------------------------------+------------+---------+
==> Source [/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc]
==> in your profile to enable shell command completion for gcloud.
==> 
==> Source [/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc]
==> in your profile to add the Google Cloud SDK command line tools to your $PATH.
==> 
==> 
==> For more information on how to get started, please visit:
==>   https://developers.google.com/cloud/sdk/gettingstarted
==> 
==> 
==> Loading legacy configuration file: [/Users/patsplat/.config/gcloud/properties]
==> This configuration file is deprecated and will not be read in a future
==> gcloud release.  gcloud will automatically migrate your current settings to the
==> new configuration format the next time you set a property by running:
==>   $ gcloud config set PROPERTY VALUE
==> You may also run:
==>   $ gcloud init
==> to create a new configuration and walk you through initializing some basic
==> settings.  You can find more information on named configurations by running:
==>   $ gcloud topic configurations
==> 
==> 
==> 
==> Your current Cloud SDK version is: 97.0.0
==> Installing components from version: 97.0.0
==> 
==> 
==> For the latest full release notes, please visit:
==>   https://cloud.google.com/sdk/release_notes
==> 
==> #============================================================#
==> #= Creating update staging area                             =#
==> #============================================================#
==> #= Installing: BigQuery Command Line Tool                   =#
==> #============================================================#
==> #= Installing: BigQuery Command Line Tool (Platform Spec... =#
==> #============================================================#
==> #= Installing: Cloud SDK Core Libraries (Platform Specific) =#
==> #============================================================#
==> #= Installing: Cloud Storage Command Line Tool              =#
==> #============================================================#
==> #= Installing: Cloud Storage Command Line Tool (Platform... =#
==> #============================================================#
==> #= Installing: Default set of gcloud commands               =#
==> #============================================================#
==> #= Creating backup and activating new installation          =#
==> #============================================================#
==> 
Performing post processing steps...done.
==> 
==> Update done!
==> 
==> Symlinking Binary 'bq' to '/usr/local/bin/bq'
==> Symlinking Binary 'gcloud' to '/usr/local/bin/gcloud'
==> Symlinking Binary 'git-credential-gcloud.sh' to '/usr/local/bin/git-credential-gcloud'
==> Symlinking Binary 'gsutil' to '/usr/local/bin/gsutil'
🍺  google-cloud-sdk staged at '/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest' (8077 files, 106M)
$

Output of brew doctor

$ brew doctor
Your system is ready to brew.
$

Output of brew cask doctor

$ brew cask doctor
==> OS X Release:
10.11
==> OS X Release with Patchlevel:
10.11.3
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p645
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
Homebrew 0.9.5 (git revision 24d4e; last commit 2016-02-19)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local
==> Homebrew Origin:
https://github.com/Homebrew/homebrew
==> Homebrew-cask Version:
0.60.0 (git revision 7262; last commit 2 hours ago)
==> Homebrew-cask Install Location:
<NONE>
==> Homebrew-cask Staging Location:
/opt/homebrew-cask/Caskroom
==> Homebrew-cask Cached Downloads:
/Library/Caches/Homebrew
/Library/Caches/Homebrew/Casks
2 files, 7.5M (warning: run "brew cask cleanup")
==> Homebrew-cask Default Tap Path:
/usr/local/Library/Taps/caskroom/homebrew-cask
==> Homebrew-cask Alternate Cask Taps:
<NONE>
==> Homebrew-cask Default Tap Cask Count:
2977
==> Contents of $LOAD_PATH:
/usr/local/Library/Taps/caskroom/homebrew-cask/lib
/usr/local/Library/Homebrew
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin15
/Library/Ruby/Site/2.0.0/universal-darwin15
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
<NONE>
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/usr/local/sbin:/Users/patsplat/Sites/patricksdata/vendor/datapipeline-cli:/Users/patsplat/.composer/vendor/bin:/Users/patsplat/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Library/Taps/caskroom/homebrew-cask/cmd:/usr/local/Library/Taps/homebrew/homebrew-services/cmd:/usr/local/Library/ENV/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/bin/bash"
==> Contents of Locale Environment Variables:
LANG="en_US.UTF-8"
==> Running As Privileged User:
No
$

Now works

$ brew update; brew cleanup; brew cask cleanup
Already up-to-date.
Warning: Skipping boost: most recent version 1.60.0_1 not installed
Warning: Skipping cairo: most recent version 1.14.6_1 not installed
Warning: Skipping ffmpeg: most recent version 2.8.6 not installed
Warning: Skipping fontconfig: most recent version 2.11.1_2 not installed
Warning: Skipping freetype: most recent version 2.6.3 not installed
Warning: Skipping git: most recent version 2.7.1 not installed
Warning: Skipping imagemagick: most recent version 6.9.3-0_2 not installed
Warning: Skipping mysql: most recent version 5.7.11 not installed
Warning: Skipping node: most recent version 5.6.0 not installed
Warning: Skipping openssl: most recent version 1.0.2f not installed
Warning: Skipping opus: most recent version 1.1.2 not installed
Warning: Skipping homebrew/php/php56: most recent version 5.6.18 not installed
Warning: Skipping homebrew/php/php56-imagick: most recent version 3.3.0_1 not installed
Warning: Skipping homebrew/php/php56-mcrypt: most recent version 5.6.18 not installed
Warning: Skipping homebrew/php/php56-pdo-pgsql: most recent version 5.6.18 not installed
Warning: Skipping homebrew/php/phpunit: most recent version 5.2.1 not installed
Warning: Skipping pixman: most recent version 0.34.0 not installed
Warning: Skipping postgresql: most recent version 9.5.1 not installed
Warning: Skipping rtmpdump: most recent version 2.4+20151223 not installed
Warning: Skipping sqlite: most recent version 3.11.0 not installed
==> Removing dead symlinks
Nothing to do
==> Removing cached downloads
/Library/Caches/Homebrew/google-cloud-sdk-latest.tar.gz
/Library/Caches/Homebrew/Casks/google-cloud-sdk-latest.tar.gz
==> This operation has freed approximately 7.5M of disk space.
$
vitorgalvao commented 8 years ago

Please always follow the reporting bugs guide. To do so, edit the top post and then comment after this one so I can check back.

Closing in the meantime, because a number of people never report back and it’s useless to keep the issue open in that case and without all the required information.

patsplat commented 8 years ago

np will get back to you. ty

patsplat commented 8 years ago

After re-running all commands it works. Also gem uninstalled nokogiri 1.6.x; after re-installing looks like nokogiri 1.5.x was installed

$ ls -lh /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0/gems/
total 0
drwxr-xr-x   4 root  wheel   136B Aug 22 20:24 CFPropertyList-2.2.8
drwxr-xr-x  11 root  wheel   374B Aug 22 20:25 libxml-ruby-2.6.0
drwxr-xr-x  19 root  wheel   646B Aug 22 20:25 nokogiri-1.5.6
drwxr-xr-x  14 root  wheel   476B Aug 22 20:25 sqlite3-1.3.7
$ 

Thanks for help.

Cheers,

Patrick

patsplat commented 8 years ago

May have been a conflict btw installing SDK directly vs via cask. Had initially installed directly, then was transitioning to using cask to manage.