安装 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
完成上述步骤后,五级分页将被禁用。