I have an HP Laserjet Pro M148 multifunction printer/scanner that requires an updated hplip. The HP RPMs for Centos and RHEL are broken and HP's instructions for the manual build and install don't work either.
1 Answers
There is very little out there on how to do this and questions on other forums were not helpful or unanswered, and locked so I couldn't respond. I got it to work and want to share the process that worked for me:
Download the tarball from here. Get the advanced tarball from the bottom. As of this writing, the link is https://sourceforge.net/projects/hplip/files/hplip/3.23.5/hplip-3.23.5.tar.gz/download.
Untar it into a folder and move to that folder.
Install the hplip packages to get all the dependencies:
sudo dnf install hplip hplip-gui
Remove the hplip files, but leave the dependencies:
sudo rpm -e --nodeps hplip hplip-gui hplip-libs hplib-common
Add other needed build dependencies. Note: This is my dev box, so if you run the configure command below and it breaks, you probably are missing a package that I have already installed (i.e.: libusb-devel). Just search for that devel package and install it, too:
sudo dnf install net-snmp-devel sane-backends-devel
Configure the build for Qt5:
./configure --with-hpppddir=/usr/share/cups/model/HP --libdir=/usr/lib64 --prefix=/usr --disable-qt4 --enable-qt5 --disable-libusb01_build --enable-doc-build --enable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --disable-udev_sysfs_rules --disable-policykit --disable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build
Make and install:
make sudo make install
Run hp-setup.
Happy printing (and scanning!)

- 101
- 1
-
Have you tried grabbing the srpm from hp or rhel and just upgrade the sources - maybe tuning a few things if needed? – Ginnungagap Aug 15 '23 at 19:21
-
I have thought of that, and I've repackaged more software into RPMs than I can count. Unfortunately I don't have time at the moment and this is my personal desktop, which I expect is the case with most people wanting to upgrade HPLIP. Of course it is better to have everything managed by the package manager, but sometimes you just need it to work *right now*! Thanks for the suggestion. Someday when I get some time, perhaps I'll work with the RPM maintainer to update it. – Joseph Freivald Aug 17 '23 at 04:45
-
It was more about saving time as grabbing the spec and just changing the version often mostly works with minor tuning which might have been simpler in addition to being RPM managed but whatever works for you – Ginnungagap Aug 17 '23 at 07:31