How to install El Capitan on an Erased Macbook Pro when Recovery and Internet Recovery don't work?
I have a 2013 Macbook Pro that I'm about to give away so in preparation, I erased the hard drive via Disk Utility and intended to reinstall OSX in Recovery Mode. However in Recovery Mode, it will try to download El Capitan and install it but it will fail each time. It'll go through the process of logging me into the App Store, and download El Capitan, but at some point, it will say it's unable to install it.
I've tried Internet Recovery Mode and that too goes through some downloading process but spits out an exclamation mark and some 510 or 501 error (some error starting with 5 that I can't remember exactly).
I've managed to download the El Capitan installer DMG and have extracted that into the PKG file which is on a USB plugged into that Macbook Pro
My question therefore is how do I run this installer on that Macbook Pro when there's only a basic operating system running? Or more broadly, how do I get El Capitan installed again?
Any help would be appreciated! Thanks :)