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

Virtualbox 5.2.20,125813 fails to install (installer fails) #53795

Closed BenjaminHCCarr closed 6 years ago

BenjaminHCCarr commented 6 years ago

General troubleshooting steps

Description of issue

version 5.2.20,125813 of Cask virtualbox fails to install.

Command that failed

brew cask install --force virtualbox

it was removed by an upgrade attempt

Output of command with --force --verbose --debug

benc$ brew cask reinstall --force --verbose --debug virtualbox
==> Cask::Installer#reinstall
==> Cask::Installer#install
==> Printing caveats
==> Caveats
To install and/or use virtualbox you may need to enable their kernel extension in

  System Preferences → Security & Privacy → General

For more information refer to vendor documentation or the Apple Technical Note:

  https://developer.apple.com/library/content/technotes/tn2459/_index.html

==> Cask::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://download.virtualbox.org/virtualbox/5.2.20/VirtualBox-5.2.20-125813-OSX.dmg
Already downloaded: /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg
==> Checking quarantine support
/usr/bin/xattr
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg
==> /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg is quarantined
==> Downloaded to -> /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg
==> Verifying SHA-256 checksum for Cask 'virtualbox'.
==> Installing Cask virtualbox
==> Cask::Installer#stage
hdiutil imageinfo /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg
==> Extracting primary container
==> Using container class UnpackStrategy::Dmg for /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg
hdiutil attach -plist -nobrowse -readonly -noidme -mountrandom /var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/d20181019-74481-6mtnrg /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg
find . -print0
mkbom -s -i /var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/20181019-74481-12fvo3r.list -- /var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/20181019-74481-j2q0ml.bom
ditto --bom /var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/20181019-74481-j2q0ml.bom -- /private/var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/d20181019-74481-6mtnrg/dmg.HaNfhZ /var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/d20181019-74481-1e3zdh8
diskutil eject /private/var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/d20181019-74481-6mtnrg/dmg.HaNfhZ
cp -pR /var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/d20181019-74481-1e3zdh8/VirtualBox.pkg /usr/local/Caskroom/virtualbox/5.2.20,125813/VirtualBox.pkg
cp -pR /var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/d20181019-74481-1e3zdh8/VirtualBox_Uninstall.tool /usr/local/Caskroom/virtualbox/5.2.20,125813/VirtualBox_Uninstall.tool
cp -pR /var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/d20181019-74481-1e3zdh8/UserManual.pdf /usr/local/Caskroom/virtualbox/5.2.20,125813/UserManual.pdf
chmod -Rf +w /var/folders/0m/67c7v9891yn3p6m0gjxwg4s00000gn/T/d20181019-74481-1e3zdh8
==> Verifying Gatekeeper status of /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg
==> /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg is quarantined
==> Propagating quarantine from /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg to /usr/local/Caskroom/virtualbox/5.2.20,125813
/usr/bin/xattr -p com.apple.quarantine /Users/benc/Library/Caches/Homebrew/downloads/4e4c523f7b63da092030660db3fd20e6a0130cfcb4c5d803fc81b15af4e4e731--VirtualBox-5.2.20-125813-OSX.dmg
/usr/bin/xargs -0 -- /bin/chmod -h u\+w
/usr/bin/xargs -0 -- /usr/bin/xattr -w -s com.apple.quarantine 0181\;5bc949cb\;Homebrew\\x20Cask\;B7D3D986-D02C-47AF-AD18-D4DC0BCAD0E3
==> Creating metadata directory /usr/local/Caskroom/virtualbox/.metadata/5.2.20,125813/20181019132228.987.
==> Creating metadata subdirectory /usr/local/Caskroom/virtualbox/.metadata/5.2.20,125813/20181019132228.987/Casks.
==> Installing artifacts
==> 3 artifact/s defined
#<SortedSet:0x00007f9a8434a4d8>
==> Installing artifact of class Cask::Artifact::Pkg
==> Running installer for virtualbox; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
/usr/bin/sudo -E -- env LOGNAME=benc USER=benc USERNAME=benc /usr/sbin/installer -pkg /usr/local/Caskroom/virtualbox/5.2.20,125813/VirtualBox.pkg -target / -verboseR
Password:
installer: Package name is Oracle VM VirtualBox
installer: Installing at base path /
installer:PHASE:Preparing for installation…
installer:PHASE:Preparing the disk…
installer:PHASE:Preparing Oracle VM VirtualBox…
installer:PHASE:Waiting for other installations to complete…
installer:PHASE:Configuring the installation…
installer:STATUS:
installer:%2.200000
installer:PHASE:Validating packages…
installer:%5.909819
installer:PHASE:Writing files…
installer:%14.331902
installer:PHASE:Writing files…
installer:PHASE:Writing files…
installer:%18.542943
installer:PHASE:Writing files…
installer:%33.281588
installer:PHASE:Writing files…
installer:%43.809191
installer:PHASE:Writing files…
installer:%64.938833
installer:PHASE:Moving items into place…
installer:%86.816930
installer:PHASE:Running package scripts…
installer:%87.871954
installer:PHASE:Running package scripts…
installer:%88.927302
installer:PHASE:Running package scripts…
installer:%89.977319
installer:PHASE:Running package scripts…
installer:%91.031471
installer:PHASE:Running package scripts…
installer:%91.183407
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Validating packages…
installer:%97.750000
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
==> Purging files for version 5.2.20,125813 of Cask virtualbox
Error: Failure while executing; `/usr/bin/sudo -E -- env LOGNAME=benc USER=benc USERNAME=benc /usr/sbin/installer -pkg /usr/local/Caskroom/virtualbox/5.2.20,125813/VirtualBox.pkg -target / -verboseR` exited with 1. Here's the output:
installer: Package name is Oracle VM VirtualBox
installer: Installing at base path /
installer:PHASE:Preparing for installation…
installer:PHASE:Preparing the disk…
installer:PHASE:Preparing Oracle VM VirtualBox…
installer:PHASE:Waiting for other installations to complete…
installer:PHASE:Configuring the installation…
installer:STATUS:
installer:%2.200000
installer:PHASE:Validating packages…
installer:%5.909819
installer:PHASE:Writing files…
installer:%14.331902
installer:PHASE:Writing files…
installer:PHASE:Writing files…
installer:%18.542943
installer:PHASE:Writing files…
installer:%33.281588
installer:PHASE:Writing files…
installer:%43.809191
installer:PHASE:Writing files…
installer:%64.938833
installer:PHASE:Moving items into place…
installer:%86.816930
installer:PHASE:Running package scripts…
installer:%87.871954
installer:PHASE:Running package scripts…
installer:%88.927302
installer:PHASE:Running package scripts…
installer:%89.977319
installer:PHASE:Running package scripts…
installer:%91.031471
installer:PHASE:Running package scripts…
installer:%91.183407
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Running package scripts…
installer:PHASE:Validating packages…
installer:%97.750000
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)

Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/system_command.rb:107:in `assert_success'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:50:in `run!'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:27:in `run'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:31:in `run!'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:59:in `block in run_installer'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:65:in `with_choices_file'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:52:in `run_installer'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:32:in `install_phase'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:207:in `block in install_artifacts'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/set.rb:674:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/set.rb:674:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:198:in `install_artifacts'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:95:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:122:in `reinstall'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/reinstall.rb:11:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/reinstall.rb:5:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/reinstall.rb:5:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:34:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:89:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:155:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:120:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:166:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:166:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:143:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:120:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'

Output of brew cask doctor

benc$ brew cask doctor
==> Homebrew Version
1.7.7-80-g1f08739
==> macOS
10.13.6
==> SIP
Enabled
==> Java
1.8.0_102
==> Gatekeeper support
Enabled
==> Homebrew Cask Install Location
<NONE>
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (4040 casks)
/usr/local/Homebrew/Library/Taps/benjaminhccarr/homebrew-cask (12 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions (205 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-eid (11 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-fonts (1181 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-drivers (155 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/ruby-macho-2.1.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/plist-3.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/backports-3.11.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/activesupport-5.2.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/tzinfo-1.2.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/thread_safe-0.3.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/minitest-5.11.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/i18n-1.1.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/concurrent-ruby-1.0.5/lib
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib
/Library/Ruby/Site/2.3.0
/Library/Ruby/Site/2.3.0/x86_64-darwin17
/Library/Ruby/Site/2.3.0/universal-darwin17
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin17
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/universal-darwin17
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/x86_64-darwin17
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin17
/usr/local/Homebrew/Library/Homebrew
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/bin/bash"

Output of brew tap

benc$ brew tap
Updating Homebrew...
beeftornado/rmtree
benjaminhccarr/cask
benjaminhccarr/tap
buo/cask-upgrade
heroku/brew
homebrew/aliases
homebrew/apache
homebrew/binary
homebrew/boneyard
homebrew/cask
homebrew/cask-drivers
homebrew/cask-eid
homebrew/cask-fonts
homebrew/cask-versions
homebrew/command-not-found
homebrew/completions
homebrew/core
homebrew/dev-tools
homebrew/devel-only
homebrew/dupes
homebrew/fuse
homebrew/games
homebrew/gui
homebrew/head-only
homebrew/livecheck
homebrew/nginx
homebrew/php
homebrew/python
homebrew/science
homebrew/services
homebrew/versions
homebrew/x11
jesseduffield/lazygit
jzelinskie/duckdns
minio/minio
pebble/pebble-sdk
vitorgalvao/tiny-scripts
commitay commented 6 years ago

You need to do this:

To install and/or use virtualbox you may need to enable their kernel extension in

  System Preferences → Security & Privacy → General

then run brew cask install --force virtualbox again.

BenjaminHCCarr commented 6 years ago

You need to do this:

To install and/or use virtualbox you may need to enable their kernel extension in

  System Preferences → Security & Privacy → General

then run brew cask install --force virtualbox again.

Did that... this appears to be a dupe https://github.com/Homebrew/homebrew-cask/issues/52659#issuecomment-426726154 with an error upstream

BenjaminHCCarr commented 6 years ago

running ~/Library/Caches/Homebrew/Cask benc$ open virtualbox--5.2.20,125813.dmg

screen shot 2018-10-19 at 9 37 54 am

BenjaminHCCarr commented 6 years ago

So this ended up being the low limit of available *.kext slots in Mac OS High Sierra

sudo kextunload -b com.github.osxfuse.filesystems.osxfuse

Allowed the cask to install.

This script allows toggling fuse or vbox: https://github.com/osxfuse/osxfuse/issues/315#issuecomment-271548072 also here as a gist: https://gist.github.com/eeree/72381ebc476055262e81d2cb30af715b