首頁 > 運維 > Mac OS > 主體

MacOS安裝VirtualBox的問題小結

藏色散人
發布: 2021-12-31 15:07:56
轉載
3505 人瀏覽過

本文由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
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板