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

Some cask applications are trying to install to /Applications instead of ~/Applications or should ask for sudo password to complete #26566

Closed michael-gracy closed 8 years ago

michael-gracy commented 8 years ago

For example, brew cask install Caskroom/cask/jenkins-menu fails when it tries to move 'Jenkins Menu.app' to /Applications where permission will be denied every time. At first I thought this was a homebrew error/bug. But I'm betting that it's something in my environment and I'll be damned if I can find it. Brief output from jenkins-menu install: '==> Moving App 'Jenkins Menu.app' to '/Applications/Jenkins Menu.app' Error: Permission denied - (/usr/local/Caskroom/jenkins-menu/0.2.0/Jenkins Menu.app, /Applications/Jenkins Menu.app) Follow the instuctions here: https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md

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/fileutils.rb:519:in rename' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:519:inblock in mv' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1558:in block in fu_each_src_dest' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1574:infu_each_src_dest0' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1556:in fu_each_src_dest' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:508:inmv' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/moved.rb:39:in move' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/moved.rb:15:inblock in install_phase' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/moved.rb:32:in block in each_artifact' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/moved.rb:31:ineach' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/moved.rb:31:in each_artifact' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/moved.rb:11:ininstall_phase' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:134:in block in install_artifacts' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:131:ineach' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:131:in install_artifacts' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:74:ininstall' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:25:in block in install_casks' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:19:ineach' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:19:in install_casks' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:10:inrun' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:110:in run_command' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:149:inprocess' /usr/local/Homebrew/Library/Homebrew/cask/cmd/brew-cask.rb:8:in <top (required)>' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' /usr/local/Homebrew/Library/Homebrew/brew.rb:24:inrequire?' /usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `' '

I am still running on 10.11.6 elCapitan

I've run brew doctor twice, got 3 warnings about unbrewed dylibs, headers and static libs. No errors. None of the warnings would cause this issue. I've had this problem with cask/gimp, cask/jenkins-menu and cask/sqlitestudio

miccal commented 8 years ago

See here for possible solutions.