If the unit was a display model and may have been set up with some kind of user account
before you bought it, was the dealer or shop an official Apple Authorized reseller/service
provider? They should have prepared it for re-sale if that was the case, and if it was used
then, they should have disclosed that status and also correctly prepared it for re-sale...
Previous associations with an Apple ID or other user setup have to be redacted by one
who can do that correctly; did the shop say anything about helping return the MacBook
to its original status, so a new user/owner could set up a new account?
You may have to see if you can use OS X Recovery (unless the storage drive has
somehow been totally erased) or go and try the online Recovery to download a
new system. There are some steps that should have been done before re-selling
a computer that had been used as a Demo or had been a returned/owned unit...
• What to do before selling or giving away your Mac -- Apple Support
• OS X: About OS X Recovery - Apple Support
• How to reinstall OS X on your Mac -- Apple Support
• How to reinstall OS X using Recovery mode - how to - MacWorld UK:
http://www.macworld.co.uk/how-to/mac/how-reinstall-mac-os-x-using-internet-recov ery-3593641/
Since I'm not doing these steps much if at all, and most of my computers use an
OS X install DVD (and do not need online OS X Recovery) they use different ones
to recover from some kind of trouble; or if replacing a hard drive with a new one.
You have tools in the Recovery (see how to boot in recovery, command R, in the
instruction about OS X recover above) and OS X Utilities are available then, too.
Once the existing content of the 'hard drive' is erased, the original partition with
the OS X Recovery usually may disappear; depending on if the entire drive was
reformatted so its partition would also be erased from the storage drive. The
installer you tried probably could not find those files needed to complete the task.
The original system as it shipped with, is what supposedly would be offered as a
download installation; so that may have varied from the first model 12-in MacBook
(retina) as a newer OS X appeared & would have been available in later production
and if the Apple ID of previous setup (if ownership and update files were associated)
a new affiliation with your Apple ID would need to be created, by using new install
of original system and then upgrade (download) a later system, if available. If the
unit shipped with Yosemite, then that's what it would need initially.
• OS X versions and builds included with Mac computers - Apple Support
Perhaps someone will suggest a shorter route; however you will need to have an
adequate internet connection with suitable bandwidth to download a new OS X...
The seller should have provided or offered to provide the restore service to set up
the computer as-new. Since they did not, hopefully they gave you a huge discount.
Is there an official retail Apple Store with Genius bar in your region or country?
That is where you should take the unit, after checking to set up reservation to
talk to someone about this specific unit. Advance appointments can help a lot.
At this point, I don't have much else to say...