Reboot your Mac and install it again.
Set your Mac to the correct date and time.
Create enough free space on your drive to install macOS.
Download a new copy of the macOS installer.
Reset the PRAM and NVRAM memory.
Run First Aid on your startup disk.