Trying to install Mojave or High Sierra or Sierra on a Mac, and getting messages about the installer being damaged? My guess: your installer isn’t damaged. Try changing the date on your Mac to sometime in 2018– maybe your “damaged installer” will magically work. Just go to the System Preferences, then Date & Time, and uncheck the box that says “Set date and time automatically.” Then change the year to 2018. Don’t worry about the day and month, just change the year. Then try your Mojave or High Sierra or Sierra installer again. Odds are good that the installation works perfectly. So much for the “Damaged Installer” error message!
This works because the installer isn’t really damaged. The real problem is that installers have a “certificate,” which is dated, and without a current certificate the installer won’t run. This is usually a good thing, except when the certificate isn’t kept up to date. In this case, Apple dropped the ball, and these Apple installers (and a bunch of their other installers) quit working. So, we turn the clock back to when the certificates were still valid, and the installers run without a problem.
You can turn on the “Set date and time automatically” check box after the installation is finished.