Error while installing Mavericks in a clean hard drive I've decided to reistall osx Mavericks on my MacBook, so I restarted my Mac clicking cmd ⌘+R. In recovery mode I erased the main hard drive so I can have a clean install.

Then I selected "Install OS X Maverics" and after asking my permission to "verify the installation with apple" I got this error:

An error occurred while preparing the installation. Try running this application again.


I restarted, and then it started the "Internet Recovery" mode, which now gives me the option to install OS X Mountain Lion instead of Mavericks, and gives me the same error every time.

I've checked the date through the terminal, and it is correct, but I am not in "PDT", I'm in "IDT" time zone.
I know it's late, but if anyone coming here for macOS 10.10+ I did the following:

Reset Drive


Boot in recovery mode (Cmd ⌘ R)
Select Disk Utility
Choose Macintosh HD
Verify Macintosh HD
Erase Macintosh HD


Reset Mac time and PRAM


Restart and hold Cmd ⌘ Opt ⌥ P R (Resetting PRAM as stated above)
After second chime, hold Cmd ⌘ R to boot in recovery mode
Select language
Enter wifi information (or plug in ethernet cable)
Select Utilities from the task bar
Choose Terminal
Enter date mmddHHMMyyyy where mm = two digit month, dd = two digit day, HH = 24 hour, MM = minute, yyyy = 4 digit year (time zone was incorrect for me, but didn't seem to matter)
Exit Terminal (Cmd ⌘ Q)


Reinstall macOS


Reinstall Mac OS X (or macOS)


It worked only after doing all of these.

Source:
https://blog.macsales.com/31640-tech-tip-an-error-occurred-while-preparing-the-installation-fix