Manual Build and Install Instructions for Ubuntu

Step 1: Installation Prerequisite Steps

View the current Release Notes for additional information on this release.

Note

You will need root access to complete many of the steps while installing HPLIP. If you do not have root access contact your system admin for assistance.


Step 2: Install Dependency Packages

A. Open a terminal shell.

B. Update your apt repositories.

Enter this command:

sudo apt-get update

C. Install the required dependency packages.

Enter this command: (choose the appropriate command depending on your version)

Ubuntu 8.04 (Hardy)

sudo apt-get install --assume-yes libcups2 cups libcups2-dev cups-bsd cups-client libcupsimage2-dev libdbus-1-dev build-essential gs-esp openssl libjpeg62-dev libsnmp-dev libtool libusb-dev wget python-imaging policykit policykit-gnome python-qt4 python-qt4-dbus python-dbus python-gobject python2.5-dev python-notify python python-reportlab libsane libsane-dev sane-utils xsane

Ubuntu 10.04 (Lucid) and above

sudo apt-get install --assume-yes libcups2 cups libcups2-dev cups-bsd cups-client libcupsimage2-dev libdbus-1-dev build-essential ghostscript openssl libjpeg62-dev libsnmp-dev libtool libusb-1.0-0-dev wget python-imaging policykit-1 policykit-1-gnome python-qt4 python-qt4-dbus python-dbus python-gobject python-dev python-notify python python-reportlab libsane libsane-dev sane-utils xsane

Ubuntu 20.04 and above

sudo apt-get install --assume-yes libcups2 cups libcups2-dev cups-bsd cups-client avahi-utils libavahi-client-dev libavahi-core-dev libavahi-common-dev libcupsimage2-dev libdbus-1-dev build-essential gtk2-engines-pixbuf ghostscript openssl libjpeg-dev libatk-adaptor libgail-common libsnmp-dev snmp-mibs-downloader libtool libtool-bin libusb-1.0-0-dev libusb-0.1-4 wget policykit-1 policykit-1-gnome automake1.11 python3-dbus.mainloop.pyqt5 python3-reportlab python3-notify2 python3-pyqt5 python3-dbus python3-gi python3-lxml python3-dev python3-pil python-is-python3 libsane libsane-dev sane-utils xsane

Step 3: Download HPLIP

Note

We recommend that you download the HPLIP tarball to your home or desktop directory.

A. Click here to Download the Regular Tarball

B. Go to the directory where you downloaded the HPLIP tarball.

Example:

cd ~/Desktop

C. Uncompress the tarball.

Enter this command:

tar xvfz hplip-3.22.6.tar.gz

This will create a directory with the same name as the tarball file.

D. Change your working directory to the hplip-3.22.6 directory.

Example:

cd hplip-3.22.6

Step 4: Configure HPLIP for installation

A. This step configures the development environment and checks that your system is ready to install HPLIP.

For specific information on using ./configure and the different options please go here. Also reference your distro documentation and configuration for additional information on which tags are relevant.

Enter this command (select the appropriate command depending on your system configuration):

Note

Ubuntu 8.04 use one of the commands below:

32 bit distro users:

./configure --with-hpppddir=/usr/share/ppd/HP --prefix=/usr --enable-qt4 --enable-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

64 bit distro users:

./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib64 --prefix=/usr --enable-qt4 --enable-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

Note

Ubuntu 10.04 and above use one of the commands below:

32 bit distro users:

./configure --with-hpppddir=/usr/share/ppd/HP --prefix=/usr --enable-udev-acl-rules --enable-qt4 --disable-libusb01_build --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --disable-udev_sysfs_rules --disable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build

64 bit distro users:

./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib64 --prefix=/usr --enable-udev-acl-rules --enable-qt4 --disable-libusb01_build --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --disable-udev_sysfs_rules --disable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build

Note

Ubuntu 20.04 and above use one of the commands below:

32 bit distro users:

./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib --prefix=/usr --enable-network-build --enable-scan-build --enable-fax-build --enable-dbus-build --disable-qt4 --enable-qt5 --disable-class-driver --enable-doc-build --disable-policykit --disable-libusb01_build --disable-udev_sysfs_rules --enable-hpcups-install --disable-hpijs-install --disable-foomatic-ppd-install --disable-foomatic-drv-install --disable-cups-ppd-install --enable-cups-drv-install --enable-apparmor_build --enable-hplip_testing_flag

64 bit distro users:

./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib64 --prefix=/usr --enable-network-build --enable-scan-build --enable-fax-build --enable-dbus-build --disable-qt4 --enable-qt5 --disable-class-driver --enable-doc-build --disable-policykit --disable-libusb01_build --disable-udev_sysfs_rules --enable-hpcups-install --disable-hpijs-install --disable-foomatic-ppd-install --disable-foomatic-drv-install --disable-cups-ppd-install --enable-cups-drv-install --enable-apparmor_build --enable-hplip_testing_flag


Step 5: Run Make

A. This step will compile the HPLIP source.

Important

You want to run make as a regular user, NOT as root.

Enter this command:

make

Step 6: Run Make Install

Note

The symlink fix script step is only required for Ubuntu 5.10, Ubuntu 6.06 and Ubuntu 7.04.

A. Run the symlink fix script.

sudo python ./installer/fix_symlink.py

Or to run the script manually run:

cat /installer/fix_symlink.py

B. This step will install HPLIP.

Enter this command:

sudo make install

Step 7: Post Installation Step(s)

A. For normal users other than root add user name to "lp" group:

sudo usermod -a -G lp $USER

Restart your PC (or) Logout and Login.

B. If you are going to be setting up a printer with USB and the printer is already plugged in, you will need to do one of the following:

  1. Unlpug and re-plug in the USB printer, or
  2. Restart your PC.

Failure to do this will cause your USB printer to not be detected by HPLIP.


Step 8: Configuring your printer using hp-setup

Continue to hp-setup