If you have an HP LaserJet P1102, HP LaserJet Pro P1102, HP LaserJet Pro P1102w or, if there exists one, an HP LaserJet Pro P1102w printer, and you are on an updated macOS Sequoia (> 15.0), HP official drivers won't install. As I am under no circumstance going to buy a new printer when this one works perfectly (on Windows 10), it turns out you can tweak the installer to bypass the operating version check, and the latest published drivers work fine.
Step-by-step guide (source):
- Download the official HP Mac Printer Driver
- Extract the
HewlettPackardPrinterDrivers.pkgfile from theHewlettPackardPrinterDrivers.dmgfile. - From a terminal, and in the folder where you extracted the
.pkgfile:pkgutil --expand HewlettPackardPrinterDrivers.pkg drivers. - Open the
drivers/Distributionfile with any text editor, and change the fragment that sayssystem.version.ProductVersion, '15.0'tosystem.version.ProductVersion, '16.0'. Save the changes. - From the terminal:
pkgutil --flatten drivers HewlettPackardPrinterDrivers-sequoia.pkg. - Delete the
driversfolder, and theHewlettPackardPrinterDrivers.dmg&HewlettPackardPrinterDrivers.pkgfiles. - The file
HewlettPackardPrinterDrivers-sequoia.pkgis, from now on, your new and ready to use installer.
This tiny hack will probably work with other printer models and installers, and maybe future operating system releases.