Why won't my Macbook let me install a new OS X?
Ok, first of all, I'm far from a computer expert or anything like that, so you'll have to excuse me if any of the problems I describe sound dumb. I still hope people can understand what happened.
I bought a refurbished Macbook A1181 (2009) a while back, and it has been working fine ever since. It used to run on OS X 10.7.5 and it was in a 100% technical condition. I ran into a problem two weeks ago when I discovered a lot of apps from the App Store that I need, do not run on OS X 10.7.5 simply because it's outdated. For example, I need to use Xcode 7.2 (the latest version) but it's not available unless you have a Macbook with the new OS X El Capitan. I decided to simply install El Capitan from the App Store, but I already got suspicious when it told me, it couldn't download the installation file for El Capitan for some reason. When I asked about it, someone told me their could be a problem with the license of the OS X Lion I was using at that time (after all, it was a refurbished). So I decided to completely re-install the OS X Lion which was already installed on the Macbook, but when I tried to format my Macintosh hard drive, I may have accidentally erased the OS X Lion as well. When I restarted my Macbook, it didn't seem like that big of a deal, since there was a "Re-install OS X Lion" button on the start-up screen (the one you normally have to open by pressing Command+R). When I clicked on that button, I had to sign in to the App Store with my Apple ID, but after I did that, it once again told me it couldn't download the installation file from the App Store. At this point I had discovered that my Macbook was somehow incapable of downloading an officially licensed OS X from the App Store (since both El Capitan and Lion couldn't be downloaded), so I tried something different. I created a bootable USB drive on my Windows PC by downloading the "Install OS X El Capitan.dmg" file from a third-party website, figuring if the Macbook couldn't download the installation file from the App Store, I could just download that installation file on a different PC and then boot it from a USB flash drive on the Macbook. After I went through some long waiting for the bootable USB drive to be created on my Windows PC (I used a software called TransMac to do it), I inserted the USB flash drive in my Macbook and pressed Option while booting it. The "Install OS X El Capitan" button actually popped up, so for a second I thought I had done the job. But when I clicked on that button, it just gave me a 'no access' symbol (circle with diagonal line through it) and then it shut down.
So, my problem in conclusion: somehow my Macbook won't allow me to install any version of OS X. Not through the App Store nor through a USB flash drive. Does anyone have any experience with this? Or does anyone know where the problem could be? And most importantly, does anyone know how to fix this so I can finally install a new OS X (preferably El Capitan)?
MacBook, Mac OS X (10.7.5)