I recently tried to wipe my Late-2011 MacBook Pro so I could sell it. After removing the files I needed I followed Apples directions to erase the data from the MacHD using Mac OS X Utility. Once the hard drive was deleted I continued to the "reinstall OS X" portion of the process. After waiting about 15 minutes for the download I got the unspecified error "An error occurred while preparing the installation. Try running this application again." After researching this problem I tried changing the date using terminal, resetting the NVRAM, and I even made a bootable version of OS X Sierra, all of which have been unsuccessful. I am not sure what else to do and I do not not want to pay Best Buy $100. Any ideas would be much appreciated. FIX: I partitioned the main drive into two equal sections and ran the OS X installer on the second half of the partition and it worked. Hope this helps others!