首頁  >  文章  >  運維  >  MacOS安裝VirtualBox的問題小結

MacOS安裝VirtualBox的問題小結

藏色散人
藏色散人轉載
2021-12-31 15:07:563128瀏覽

本文由macos教學專欄為大家介紹MacOS brew cask安裝VirtualBox遇到的問題,希望能夠幫助到有需要的小夥伴。

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'
...

以上是MacOS安裝VirtualBox的問題小結的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:awaimai.com。如有侵權,請聯絡admin@php.cn刪除