How To: Install and Configure for HP Printer

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
srq2625
Level 4
Level 4
Posts: 363
Joined: Tue Jan 08, 2013 11:35 am
Location: State: Constant Confusion, Country: D'oh

How To: Install and Configure for HP Printer

Post by srq2625 » Fri Oct 12, 2018 8:28 am

It seems many people are having difficulties printing with their HP printers. The following is a short How To to get them started.

Printing with HP printers is best(?) facilitated using the hplip software. There are at least two sources for the software (1) the LM repositories and (2) developers.hp.com. Obviously, it is best to use the software in the repository if it supports your printer.
  1. Determine the version of hplip in the LM repository:

    Code: Select all

    $ apt-cache policy hplip
  2. Determine if the hplip software in the LM repository supports your printer.
    1. Go to The Supported HP Printer index page
    2. Search for your printer.
    3. Finding your printer and compare the version of hplip that first supported your printer against the version available in the repository. If that in the repo is later than the first supporting your printer, install from the repo (see below). Otherwise, if your printer requires a version of hplip newer than is available in the repos or your printer is not listed amongst the supported devices (the list may not be updated in a timely fashion) compile and install from source (see further below).
Installing from the LM repository
Execute each of these commands in turn, understanding that each will require some configuration information.

Code: Select all

$ sudo apt install hplip hplip-gui xsane
$ hp-setup
$ hp-plugin
These commands perform the following:
  1. Installs the hplip (and supporting) packages
  2. Starts the printer configuration process. The user will be required to help the software "discover" the printer and enter other configuration information.
  3. This command is necessary only if your device has a scanner
Once the above commands have been successfully performed, your printer (and scanner, if applicable) should be fully functioning.

Installing from source
  1. Download the source code tar file. The link to the file can be found in the "Advanced Option" of this page. At the time of this writing, the file is hplip-3.18.9.tar.gz
  2. Open a terminal window and cd to the folder into which the tar file was downloaded.
  3. Execute the command

    Code: Select all

    tar xf hplip-3.18.9.tar.gz
  4. cd hplip-3.18.9
  5. Install all the packages necessary for a successful compile and installation (note that some of these packages may already be installed):

    Code: Select all

    apt-get install --install-recommends build-essential libjpeg-turbo8-dev avahi-utils cups libcups2 libcups2-dev cups-bsd cups-client libcupsimage2 libcupsimage2-dev libdbus-1-dev g++ ghostscript cups-filters ghostscript-x libssl-dev libsnmp-dev snmp libc6 libtool libtool-bin libusb-1.0-0-dev make wget policykit-1 policykit-1-gnome python3-dbus python3-gi python3-dev python3-notify2 python3-pil python3-pyqt4 gtk2-engines-pixbuf python3-dbus.mainloop.qt python3-reportlab python3-lxml sane libsane-dev sane-utils xsane python-dev python-qt4 python-qt4-dev python-pyqt5 python-dbus
  6. Configure ....

    Code: Select all

    ./configure --prefix=/usr --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib/x86_64-linux-gnu --enable-qt4 --enable-hpcups-install --enable-cups-drv-install --disable-cups-ppd-install --disable-hpijs-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-foomatic-rip-hplip-install --enable-fax-build --enable-dbus-build --enable-network-build --enable-scan-build --disable-policykit --disable-libusb01_build --disable-udev_sysfs_rules --enable-doc-build
  7. Compile the source

    Code: Select all

    $ make
  8. Install the software

    Code: Select all

    sudo make install
  9. Configure for the printer

    Code: Select all

    $ hp-setup
  10. (Optional, if you have a scanner)

    Code: Select all

    hp-plugin
Note: It may be wise to retain the tar file should the need ever arise that you wish to uninstall the software:
  1. Perform steps 2, 3 (if necessary), 4, and 6
  2. Execute

    Code: Select all

    sudo make uninstall
Work ToDo: Figure out how to build a package from the source. Building a package will allow for the possibility of using dpkg to install/uninstall and remove the need to retain the tar file.

Post Reply

Return to “Tutorials”