Os X Could Not Be Installed No Packages

Python: Could not install packages due to an OSError: Errno 2 No such file or directory 1 OS error, No such file or directory: I am unable to install certain packages. BiocManager::install('GenomeInfoDbData') Bioconductor version 3.11 (BiocManager 1.30.10), R 4.0.1 (2020-06-06) Installing package(s) 'GenomeInfoDbData'. The attempt to install data.table failed due to a problem compiling the package from source. Before trying to fix that, though, you might try installing the binary (already compiled) version that's available — it's not that much older than the source version. To try this, run: install.packages('data.table', type = 'binary'). As explained here, OS X 10.11 'El Capitan' fails to install because it is too old (the technical reason being that the signing certificate is no longer valid). But you can trick the OS X installer into thinking that it is 2017 and it will happily run without any errors. How to trick the OS X installer.

Os X Could Not Be Installed No PackagesWhen trying to upgrade from OS X 10.6.8 Snow Leopard to OS X 10.11.6 El Capitan, I repeatedly encountered a frustrating error message: 'OS X could not be installed on your computer. No packages were eligible for install. Contact the software manufacturer for assistance. Quit the installer to restart your computer and try again.'

My end goal was to install macOS 10.13 High Sierra. I read online that one must upgrade to OS X 10.11 before upgrading to macOS 10.13 if one is starting from OS X 10.6. This upgrade route did not work for me no matter how many solutions I attempted. I eventually found a solution to this frustrating problem which I'll share below, but before I do that, I'd like to share what did NOT work for me to hopefully help others avoid unnecessary frustration and wasted time:
Solution attempts that did NOT work for me:
I tried changing the time to the correct present time and to a past time when the installer certificates may have still been valid (mid-2016). The upgrade problem persisted either way.
Manually setting the date and time via the Terminal (see above link) to an earlier date is worth trying because it has worked for some people. Try this time: 1010101015
Packages
2) Erasing my internal hard drive using Disk Utility in Internet Recovery Mode
All this did was remove my data, but the persistent 'OS X could not be installed...' problem remained.

Os X Could Not Be Installed No Packages Were Eligible For Install

3) Booting from an external hard drive that was formatted to act as an installer for OS X 10.11
4) Booting in the Internet Recovery Mode option to install the version closest to the operating system that came with my Mac (Shift+Option+Command+R).
My Mac came with Snow Leopard, which is not available to download, so it attempted to install Lion, but wasn't able to do so because I had not purchased it with my Apple ID.
Here's the upgrade route that DID work for me:
1) I purchased OS X 10.7 Lion with my Apple ID and downloaded it via the Mac App Store on another Mac (so it would be in my App Store download history)
2) I booted in the Internet Recovery Mode option to install the version closest to the operating system that came with my Mac by holding down Shift+Option+Command+R while my MacBook was restarting.
3) I selected 'Reinstall Mac OS X' in the 'Mac OS X Utilities' window that appeared when Internet Recovery Mode fully booted up.
4) When prompted, I entered my Apple ID information that was used to purchase and download OS X 10.7 Lion and allowed the OS X upgrade to proceed to completion. I then had a fresh version of OS X 10.7 Lion installed on my Mac.

Os X Could Not Be Installed No Packages

5) The next step was to upgrade from OS X 10.7 Lion to macOS 10.12 Sierra using these steps.
6) Once macOS 10.12 Sierra was fully installed, I upgraded to macOS 10.13 High Sierra using these steps.
My MacBook Pro is now successfully running macOS 10.13.6 High Sierra.
Basically, what worked for me was circumnavigating the suggested route of installing OS X 10.11 before installing macOS 10.13. Instead, I followed this upgrade route: 10.6 to 10.7, then 10.12 to 10.13.

How To Fix No Packages Were Eligible For Install

I thought it may be helpful to share what worked for me in case someone else out there is trying to upgrade from OS X 10.6 Snow Leopard to macOS 10.13 High Sierra and encountering the issue I encountered. Please feel free to ask me any questions about this and I will do my best to help.

Os X Could Not Be Installed No Packages Were Eligible