MacOS brew cask安裝VirtualBox遇到的問題


問題一:Cask 'virtualbox' is already installed.

如果不是通過Homebrew安裝的virtualbox,在使用brew cask install virtualbox安裝virtualbox的的時候,會提示:

Warning: Cask 'virtualbox' is already installed.

那么就需要重新安裝virtualbox,命令:

brew cask reinstall virtualbox

如果還不巧,你的virtualbox剛好在運行中,又會提示:

Failed to unload org.virtualbox.kext.VBoxDrv - (libkern/kext) kext is in use or retained (cannot unload).

那么,就需要網上拉日志,找到:

Warning! Found the following active VirtualBox processes:

這些是運行中的虛擬主機列表,其中第一列是它們的 ID,用kill命令關閉服務,如:

kill 234

然后再重新安裝:

brew cask reinstall virtualbox

問題二:Error: Failure while executing;

安裝virtualbox的最后一步會要求輸入電腦的登陸密碼,不過在你輸入密碼后,可能還是會提示錯誤,這是因為權限的問題,主要信息如下:

~ brew cask reinstall virtualbox
 ==> Caveats
 To install and/or use virtualbox you may need to enable its kernel extension in:   System Preferences → Security & Privacy → General ... ==> Running installer for virtualbox; your password may be necessary. ==> Package installers may write to any location; options such as --appdir are ignored. installer: Package name is Oracle VM VirtualBox installer: Installing at base path / 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 6.0.10,132072 of Cask virtualbox Error: Failure while executing; `/usr/bin/sudo -E -- env LOGNAME=gary USER=gary USERNAME=gary /usr/sbin/installer -pkg /usr/local/Caskroom/virtualbox/6.0.10,132072/VirtualBox.pkg -target /` exited with 1. Here's the output: installer: Package name is Oracle VM VirtualBox installer: Installing at base path / 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:111:in `assert_success' ...

這主要是因為安裝源被block了,電腦打開:System Preferences → Security & Privacy → General,然后點右下方的“Allow”允許,再重新安裝。

https://www.awaimai.com/2808.html 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM