Mac OS X更新VirtualBox以后Genymotion無法啟動的一種情況


這兩天VirtualBox更新到5.0了,於是乎就升級了。結果升級后就中了個大獎,Genymotion起不來了。我用的是Genymotion 2.5,不久前剛升級的,因為官網打不開,不知是不是最新版。難道是VirtualBox 5.0有大改動以至於Genymotion不兼容了?

於是卸載VirtualBox 5.0,裝回大版本4里眼下最新的4.3.30,出乎意料的也起不來。既然Genymotion說生成了log,那就看一看吧:

7月 14 09:42:42 [Genymotion] [Error] Can't run VBoxManage ("list", "hostinfo")
7月 14 09:42:42 [Genymotion] [Error] Can't run VBoxManage ("list", "hostinfo")
7月 14 09:42:43 [Genymotion] [Error] Can't run VBoxManage ("list", "hostinfo")
7月 14 09:42:43 [Genymotion] [Error] Can't run VBoxManage ("list", "hostinfo")
7月 14 09:42:44 [Genymotion] [Error] Can't run VBoxManage ("list", "hostinfo")
7月 14 09:42:44 [Genymotion] [Error] Can't run VBoxManage ("list", "hostinfo")
7月 14 09:42:45 [Genymotion] [Error] "Fail to load vboxmanage plugin from /Applications/Genymotion.app/Contents/MacOS/plugins/"
7月 14 09:42:45 [Genymotion] [Error] VM Engine failed to load
7月 14 09:42:45 [Genymotion] [Error] Unable to find VM Engine. Plugin loading aborted.

看起來是說執行VBoxManage失敗了,在終端了試了一下VBoxManage list hostinfo,是可以成功執行的。查找了一下VBoxManage的位置,是在/usr/local/bin之下。記得更新之前VirtualBox是4.3.26版,回頭對比了一下,當時的VBoxManage是在/usr/bin之下的,難道?不會吧!!!

於是,試着在/usr/bin下建立鏈接:

for file in `lsbom -fs /private/var/db/receipts/org.virtualbox.pkg.virtualboxcli.bom`
do
    sudo ln /usr/local/bin/${file:2} /usr/bin/${file:2}
done

結果,搞定!也就是說,更新VirtualBox后Genymotion起不來的真正原因,就是因為新版本中VBoxManage等工具從原來的/usr/bin移動到了/usr/local/bin之下,所以Genymotion找不到了。真是有點奇葩呀。


免責聲明!

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



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