Restart the Mac, hold Command+R until the apple logo appears.
If the error message like below appear at the end of installation progress,
“OS X could not be installed on your computer. No packages were eligible for install”
- Turn off the wifi
- Open Utilities > Terminal from the menu on top
- Type the following command in terminal to set date back to 2017 (note: date format: mmddhhmmyy):
date 0115124517 - Hit restart
- After restart, repeat step 1-3 before continue with installation to ensure the date still 2017.
Reference if issue still can’t be solved
https://discussions.apple.com/thread/250793420?answerId=251511664022