Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save danielcuadra/b6cdc83a6ba1260aec9fbd6a4dd3df62 to your computer and use it in GitHub Desktop.

Select an option

Save danielcuadra/b6cdc83a6ba1260aec9fbd6a4dd3df62 to your computer and use it in GitHub Desktop.
HP Printer Fix for macOS Sequoia — moved to https://github.com/pavelbinar/hp-printer-fix-macos

HP LaserJet P1102 Drivers for macOS Sequoia, Tahoe and above (any version)

This instructions provides a solution for installing HP LaserJet P1102 drivers on macOS Sequoia, Tahoe and above (any version). The official HP drivers don't install on the latest macOS versions, but with a simple modification to bypass the operating system version check, you can get your printer working again.

  • This fork allows passing the exact OS version to the repackaged installer.

Supported Printer Models

  • HP LaserJet P1102
  • HP LaserJet Pro P1102
  • HP LaserJet Pro P1102w

Manual Installation Steps

  1. Download the official HP Mac Printer Driver
  2. Extract the HewlettPackardPrinterDrivers.pkg file from the HewlettPackardPrinterDrivers.dmg file
  3. From a terminal, navigate to the folder where you extracted the .pkg file and run:
    pkgutil --expand HewlettPackardPrinterDrivers.pkg drivers
    
  4. Open the drivers/Distribution file with any text editor
  5. Change the fragment that says system.version.ProductVersion, '15.0' to system.version.ProductVersion, '26.4.1' for example
  6. Save the changes
  7. From the terminal, run:
    pkgutil --flatten drivers HewlettPackardPrinterDrivers-26.4.1.pkg
    
  8. Delete the drivers folder, and the HewlettPackardPrinterDrivers.dmg & HewlettPackardPrinterDrivers.pkg files
  9. The file HewlettPackardPrinterDrivers-sequoia.pkg is your new installer that works with macOS 26.4.1

Automated Installation

For an automated installation, place the install-driver.sh script in the same directory as your HewlettPackardPrinterDrivers.pkg file and run:

chmod +x install-driver.sh
./install-driver.sh

The script will perform all the necessary modifications and create the compatible installer package.

Notes

  • This solution should work with other HP printer models and installers that have similar version check limitations
  • It may also work with future macOS releases by adjusting the version number accordingly
  • No changes are made to the actual driver files, only to the installer's version check

Disclaimer

This is an unofficial workaround and not officially supported by HP. Use at your own risk.

Credits

This solution is based on the information provided in this blog post by Kartones.

#!/bin/bash
# HP LaserJet P1102 Driver Installer for macOS modern versions (like Sequoia or Tahoe)
# Based on: https://blog.kartones.net/post/macos-tahoe-hp-laserjet-p1102-drivers/
# Print colored output
print_green() {
echo -e "\033[0;32m$1\033[0m"
}
print_yellow() {
echo -e "\033[0;33m$1\033[0m"
}
print_red() {
echo -e "\033[0;31m$1\033[0m"
}
# Check if HewlettPackardPrinterDrivers.pkg exists in the current directory
if [ ! -f "HewlettPackardPrinterDrivers.pkg" ]; then
print_red "Error: HewlettPackardPrinterDrivers.pkg not found in the current directory."
print_yellow "Please extract the .pkg file from the HP driver .dmg file first."
exit 1
fi
# Create a temporary directory for the expanded package
print_green "Expanding the HP driver package..."
pkgutil --expand HewlettPackardPrinterDrivers.pkg drivers
# Check if the Distribution file exists
if [ ! -f "drivers/Distribution" ]; then
print_red "Error: Distribution file not found in the expanded package."
exit 1
fi
# Get OS version
macos_version=$(sw_vers -productVersion 2>&1)
# Modify the Distribution file to bypass the macOS version check
print_green "Modifying the Distribution file to support macOS $macos_version..."
sed -i '' "s/system.version.ProductVersion, '15.0'/system.version.ProductVersion, '$macos_version'/g" drivers/Distribution
# Check if the modification was successful
if grep -q "system.version.ProductVersion, '$macos_version'" drivers/Distribution; then
print_green "Distribution file successfully modified."
else
print_red "Error: Failed to modify the Distribution file."
exit 1
fi
# Create the modified package
print_green "Creating the modified package for macOS $macos_version..."
pkgutil --flatten drivers HewlettPackardPrinterDrivers-$macos_version.pkg
# Check if the new package was created
if [ ! -f "HewlettPackardPrinterDrivers-$macos_version.pkg" ]; then
print_red "Error: Failed to create the modified package."
exit 1
fi
# Clean up
print_green "Cleaning up temporary files..."
rm -rf drivers
print_green "✅ Installation package successfully created!"
print_green "The modified driver package is: HewlettPackardPrinterDrivers-$macos_version.pkg"
print_yellow "You can now install the driver by double-clicking on HewlettPackardPrinterDrivers-$macos_version.pkg"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment