c header files matching you running kernel were not found

centos7下运行VMware workstation图形化报错

c header files matching you running kernel were not found

提示kernel头文件找不到

解决办法:

yum install -y kernel-devel

再次运行vmware命令即可调用图形化

辅助:

centos安装图形化:

yum groupinstall "GNOME Desktop"

centos设置开机进入图形化:

ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target

或者使用:

  1. centos 修改开机进入默认图形化还是多用户模式
通过systemctl get-default可获得默认启动的target
通过systemctl set-default设置默认启动的target
  1. 那么,想修改为多用户状态只需执行:
systemctl set-default multi-user.target
  1. 修改为图形界面执行:
systemctl set-default graphical.target

You may also like...

发表评论