The basic centos7 box is installed in the vagrant box, but the environment does not have the compilation software installed, so it is required to install it by itself.
1. Check the number of source packages installed by the group: yum group list , search the Development keyword: yum gropu list | grep Development , get:
[vagrant@localhost ~]$ yum group list | grep Development There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Development and Creative Workstation Desktop Platform Development Development Tools Server Platform Development
2. Install the Development Tools package: sudo yum groupinstall " Development Tools "