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

mediathek install failing #8693

Closed falkorichter closed 9 years ago

falkorichter commented 9 years ago

I did the usual cleanup and upgrade but mediathek does not install As I understand https://github.com/caskroom/homebrew-cask/blob/master/Casks/mediathekview.rb is still an old recipe. Should they still work?

➜  ~ git:(master) βœ— brew cask install mediathekview  
==> Downloading http://downloads.sourceforge.net/project/zdfmediathk/Mediathek/M
Already downloaded: /Library/Caches/Homebrew/mediathekview-8.dmg
Error: no implicit conversion of nil into String
Please report this bug:
    https://github.com/caskroom/homebrew-cask/issues
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/digest.rb:44:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/digest.rb:44:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/digest.rb:44:in `file'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/digest.rb:29:in `file'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/download.rb:41:in `block in _check_sums'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/download.rb:39:in `each'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/download.rb:39:in `_check_sums'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/download.rb:32:in `perform'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/installer.rb:72:in `download'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/installer.rb:49:in `install'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/cli/install.rb:20:in `block in install_casks'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/cli/install.rb:17:in `each'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/cli/install.rb:17:in `install_casks'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/cli/install.rb:6:in `run'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/cli.rb:81:in `run_command'
/usr/local/Cellar/brew-cask/0.46.0/rubylib/cask/cli.rb:121:in `process'
/usr/local/bin/brew-cask.rb:42:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/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/Library/brew.rb:58:in `require?'
/usr/local/Library/brew.rb:142:in `<main>'

this is the output of the clean command, very weird it tells me there is no brew-cask installed

➜  ~ git:(master) βœ— brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup
Already up-to-date.
Error: No available formula for brew-cask 

my brew list

➜  ~ git:(master) βœ— brew list
ack         gawk            jenkins         mpfr            s-lang
ant         gcc         jmeter          mtr         spidermonkey
apktool         gdbm            jpeg            mysql           texi2html
archey          gettext         lftp            node            tree
autoconf        git         libffi          nspr            unixodbc
automake        git-flow        libmpc          openssl         watch
brew-cask       glib            libpng          pcre            wget
cloog           gmp         libssh2         phantomjs       wry
coreutils       gnu-sed         libtool         pidcat          xctool
csshx           gradle          libusb          pkg-config      xz
dex2jar         groovy          libusb-compat       pngcrush        yasm
dfu-programmer      icu4c           maven           readline        zsh
emacs           imagemagick     maven30         redis
freetype        isl         midnight-commander  repo

so I unlinked cask and reinstalled:

➜  ~ git:(master) βœ— brew unlink brew-cask
Unlinking /usr/local/Cellar/brew-cask/0.46.0... 2 symlinks removed
➜  ~ git:(master) βœ— brew install caskroom/cask/brew-cask
==> Installing brew-cask from caskroom/homebrew-cask
==> Cloning https://github.com/caskroom/homebrew-cask.git
Updating /Library/Caches/Homebrew/brew-cask--git
==> Checking out tag v0.52.0
==> Patching
🍺  /usr/local/Cellar/brew-cask/0.52.0: 2358 files, 9.3M, built in 17 seconds
➜  ~ git:(master) βœ— brew upgrade brew-cask                                                    
Error: No available formula for brew-cask 

then the install worked:

➜  ~ git:(master) βœ— 
brew cask install mediathekview                                           
==> Downloading http://downloads.sourceforge.net/project/zdfmediathk/Mediathek/Mediathek%208/MediathekView_8.dmg
Already downloaded: /Library/Caches/Homebrew/mediathekview-8.dmg
==> Symlinking App 'MediathekView.app' to '/Users/falkorichter/Applications/MediathekView.app'
🍺  mediathekview staged at '/opt/homebrew-cask/Caskroom/mediathekview/8' (160 files, 180M)

my taps:

➜  ~ git:(master) βœ— brew tap
caskroom/cask
caskroom/versions
homebrew/versions

I suspect the versions to be outdated so I removed them:

➜  ~ git:(master) βœ— brew tap      
caskroom/cask
homebrew/versions
vitorgalvao commented 9 years ago

What’s the issue, then? It seems like the installation ended up working.

tapeinosyne commented 9 years ago

This is a known problem (#6179, #6539); unfortunately, there is little we can do. I defer the explanation to https://github.com/caskroom/homebrew-cask/issues/6539#issuecomment-58272780:

This is some sort of problem in the Homebrew codebase, which occurs when you run brew upgrade brew-cask.

The cause is unknown, and there is no sharing of code or personnel between our two projects. If your command starts with brew but not brew cask, then none of our code gets executed, and there is nothing that we can change here to make it work.

That doesn't mean we aren't sympathetic; quite the contrary. At some point we added brew cleanup && brew cask cleanup to the lengthy recommended command because it helped some users with similar issues.

The usual solution to this glitch is some degree of un-installing and re-installing Homebrew-cask, as in https://github.com/caskroom/homebrew-cask/issues/6179#issuecomment-56262117 .