The above error occurs in Docker. We need to use the command when starting the Centos 7 image
sudo docker run -idt -p 8880:8069 -p 8881:22 --name Centos8880 --privileged=true centos:centos7 /usr/sbin/init
Add parameters:
--privileged=true
/usr/sbin/init
You can use systemctl to start the service