You can eliminate the possibility of any problem being caused by errors in your system by
- shutting down your computer,
- waiting 15 or 20 seconds
- rebooting while holding Option+Command+R
- run the installer from the Recovery Drive. Note: you may have to manually log onto your WiFi network as everything, including the Recovery drive is downloaded from the internet.
Option+Command+R installs the latest version of MacOS that is compatible with your computer as opposed to Command+R which installs the version currently installed on your computer and Shift+Option+Command+R which installs the version of MacOS that came on your computer from the factory or the closest available version.