Cento7安装VMware Tools出现:What is the location of the gcc program on your machine? INPUT: [] default

刚刚学习lunix系统,想在VMware里的centos7里安装一个tools。安装了好几天了怎么都装不进去。今天正好休息,用了大半天时间找了各种文档教程,总装上了,现在分享一下心得。
一、在centos7中找不到tools的安装包,各种mount 、df -h都没有。最后是用下面的方法的找出来的
1、在CentOS 7虚拟机安装完成之后,点击VMware Workstation下方提示中的“安装Tools按钮”或点击菜单“虚拟机->安装VMware Tools”启动VMware工具安装任务; 这时候进入控制台界面,各种mount 、df -h都找不到tools 文件。/dev/sr0 的挂载点上显示的还是centos7的iso.所以这里要重启一下。重启以后重新进入控制台,df -h出现下图

Cento7安装VMware Tools出现:What is the location of the gcc program on your machine? INPUT: [] default
2、 cd /run/media/test/VMware\ Tools/
Cento7安装VMware Tools出现:What is the location of the gcc program on your machine? INPUT: [] default
3、在新的拷备目录里解压VMwareTools-10.2.5-8068393.tar.gz
Cento7安装VMware Tools出现:What is the location of the gcc program on your machine? INPUT: [] default
4、运行了上面以后就是一直按回车了,但是有一步给卡死了Cento7安装VMware Tools出现:What is the location of the gcc program on your machine? INPUT: [] default
5、运行yum -y intsall perl gcc gcc-c++ automake make kernel kernel-headers kernel-devel
更新。发现更新不了。原来是yum出了问题。查看/etc/yum.repos.d/下面目录。发现里面什么也没有。使用国内的阿里云镜像wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo然后clean all 、 makecache。再进入/etc/yum.repos.d/下面目录发现有了Cento7安装VMware Tools出现:What is the location of the gcc program on your machine? INPUT: [] default
5、yum装好以后继续运行./ vmware-install.pl 然后出了下面的情况
Enter the path to the kernel header files for the 3.10.0-957.el7.x86_64
kernel?

INPUT: [] default

The path “” is not a valid path to the 3.10.0-957.el7.x86_64 kernel headers.
Would you like to change it? [yes]
INPUT: [yes] default
运行以下两条命令
yum -y install perl gcc make kernel-headers kernel-devel

yum -y install kernel-devel-$(uname -r)
6、运行./ vmware-install.pl然后一直按回车就ok了。