解決安裝laravel/homestead vagrant環境報"A VirtualBox machine with the name 'homestead' already exists."的錯誤


之前在mac上安裝laravel/homestead vagrant虛擬機環境時由於參照的教程是: 每次都必須在~/Homestead目錄下邊運行vagrant up/halt命令,覺得實在是不方便,於是乎按照另外一個教程(在任何目錄下可以通過homestead up來啟動虛擬機)來配置環境,但是當鍵入homestead up時,卻報出

==> default: Importing base box 'laravel/homestead'...

==> default: Matching MAC address for NAT networking...

A VirtualBox machine with the name 'homestead' already exists.

Please use another name or delete the machine with the existing

name, and try again.

這樣的錯誤

stackoverflow上好幾個人說通過vagrant global-status 查看虛擬器,然后在vagrant destroy {id}刪除對應名稱的虛擬機可以解決問題,但是重復n遍homestead up或者到~/Homestead下運行vagrant up之后,還是會報出上邊的錯誤,后來通過VBoxManage list vms獲取虛擬機列表,然后在通過運行

VBoxManage unregistervm homestead --delete

之后,重新運行homestead up之后 一切回歸正常


免責聲明!

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



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