安裝 VMware 需要 GCC 12版本
標題通過 PPA 安裝
這是最簡單的方法,適用于大多數 Ubuntu 版本。
步驟 1:添加 PPA 倉庫
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
安裝 GCC 12
sudo apt install gcc-12 g++-12
驗證安裝
gcc-12 --version
標題安裝依賴
sudo apt install build-essential linux-headers-$(uname -r)
下載 VMware
https://support.broadcom.com PS:需要注冊賬號
安裝 VMware
sudo chmod +x VMware-Workstation-Full-17.6.2-24409262.x86_64.bundle
sudo ./VMware-Workstation-Full-17.6.2-24409262.x86_64.bundle
#VMware 首次啟動虛擬機失敗
錯誤提示:vmware workstation cannot run on hosts with 5-level paging enabled
禁用五級分頁
將 no5lvl 加?內核啟動參數
編輯GRUB配置文件:
打開終端并使用文本編輯器(如nano或vim)編輯GRUB配置文件:
sudo gedit /etc/default/grub
修改GRUB參數:
在文件中找到以下行:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
修改為:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash no5lvl"
如果有單獨的 GRUB_CMDLINE_LINUX 行,也可以添加 no5lvl 參數:
GRUB_CMDLINE_LINUX="no5lvl"
更新GRUB配置:
保存并關閉文件后,在終端中運行以下命令以更新GRUB配置:
sudo update-grub
重啟系統:
sudo reboot
完成上述步驟后,五級分頁將被禁用。