How to install an HP printer on Ubuntu

An in-depth tutorial on how to install an HP printer or multifunction on an Ubuntu system, using the HPLIP library.

How to install an HP printer on Ubuntu

This guide aims at being of help to those of you who have found problems with the installation of a HP printer or multifunction to dispose of its most advanced features. Most of the time problems arise from the lack of the most suitable drivers, and this is the reason why we will analyze the installation procedure, so that step by step you will come to have a HP printing driver on your Ubuntu system.

The HPLIP software

HPLIP is an interface developed by HP to give Linux printing, scanning and fax functionalities.
The last version available at the moment (2.8.9) supports 1.445 models of HP printers and most probably the printer you're going to install is listed there.
To be sure of this, you just need to check the page that contains the entire list of the supported printers.
After having identified your model of printer in the list, pay attention to the first parameter, Min. HPLIP Version, which represents the minimum version of HPLIP that you need.

Every Ubuntu system contains a version of HPLIP (i.e. mine is the 2.8.2) by default. To verify this, type the following command on terminal:

dpkg -l hplip


You shall get a message similar to this:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name         Version            Description
+++-============-===================-======================================================
ii  hplip        2.8.2-0ubuntu8      HP Linux Printing and Imaging System (HPLIP)


If in the first column you read the "ii" characters, it means that the version showed in the third column is currently installed on your computer.
If the installed version of HPLIP is lower that the minimum version that you require, keep reading, or skip to the next paragraph about the installation of a printer.

Updating HPLIP

The updating can be done in two different ways, even if the automatic updating is not always enough, as it depends on the last HPLIP version available in the Ubuntu repository.

Automatic Update

To update HPLIP to the last version in the Ubuntu repository, type the following on terminal

sudo apt-get update


followed by the command

sudo apt-get upgrade


Like this all the installed packs will be updated to the last version, including HPLIP.
After the update, run the check described above to get the number HPLIP version installed on your system and, in case it doesn't satisfy the requirements yet, keep reading and follow the manual procedure.
If the installed version is sufficient, skip to the next paragraph.

Manual Update

As reported on the official guide, the manual installation requires the following steps:

  1. Download the installation file on your computer (i.e. in the Home directory or on your Desktop)

  2. Open the terminal and move to the path where the file has been downloaded, typing for instance:

    cd ~/Desktop
  3. Type the following command and click <enter>

    sh hplip-2.8.9.run
  4. When requested, type in order:

    • "a" for automatic installation

    • "y" if the displayed version of Ubuntu corresponds to yours

    • "n" in case your printer can connect through USB (otherwise "y" if it uses a parallel port)

    • your root password

    • <enter> to start the installation

    • during the passage RESTART OR RE-PLUG IS REQUIRED, type "p" and, when requested, unplug and re-plug the USB cable of your printer, followed by a <enter> on terminal (if your printer uses a parallel port type "r" and follow the indicated steps)

    • at this point the software hp-setup will be automatically activated and you'll be able to finally start the installation procedure.

Should you encounter problems during the installation, leave a comment on this article and we shall try to find a solution together.

Installation of the printer

Through the automatic installation of the most recent version of hplip, or by typing the command "sudo hp-setup", you've arrived to the core of the installation.
Here a short summary of the operations to perform to get a HP printer on the darling Ubuntu system.

  1. select the "Connection Type" (usually USB) and click on Next

  2. select your printer between the automatically found ones and click on Next (if no printer is displayed, choose Find manually)

  3. click on Next on the 2 following pages

  4. click on Finish to complete the installation procedure and wait for the print of the test page.

Mark the HP printer as your default

To make the HP printer system default, select "Print" from the menu "Administration".
After inserting the root password and having displayed the list of installed printers, click on the name of your favourite printer.
At the option "Default Printer", click on "Make Default".

Well, we've come to the end of the installation procedure, now you only have to configure the printing options. From this step on, your loyal printer will be perfectly compatible with Ubuntu.

Publication details

Category: Ubuntu and Linux

Published by: loryzz on date: 18.09.2008 11:39:29

Last edit by: loryzz on date: 24.10.2008 13:54:06

Statistics

Details  This article has been viewed 19.174 times.

Send to

add to digg add to reddit add to furl add to facebook add to delicious add to google add to stumbleupon add to technorati add to ask add to live

Ratings

  • Currently 86.6; ?>/ TOTALSTARS
  • 1
  • 2
  • 3
  • 4
  • 5

Comments

Details 12 user comments, 1 still waiting.

  1. Comment by: hp printers install on date: 23.10.2008 19:17:11

    I got everything to work up to installing the printer. I am using ubuntu 7.04.
    The software stated no printer connected but I am using it on the lpt 1 but it does not print right from cups. I figured the HP software would work better. The program just keeps searching and when I stop it, it states that it is not responding.

  2. Comment by: loryzz on date: 23.10.2008 21:24:35

    Firstly update HPLIP to the newest version, as described in more detail above.
    In your case, in the chapter "Installation of the printer", you have to choose LPT in the Connection Type, click on "Advanced" button and choose "detects all devices". Then, click "OK" and "Next" to start scanning.

  3. Comment by: hp printers install on date: 24.10.2008 12:26:56

    I have updated to the newest version checked the LPT connection and the software still does not detect the printer which is a HP 1000c. I tried to install manually using the /dev/parport0 which still will not work. I then went to the bios setup and checked the port there which was good and enabled. I can then change the port type from EPP,ECP to normal also did not make any difference. I then went back to ubuntu and installed the printer using cups which works but does not print right because of the drivers in ubuntu.
    I think I'm going to give up on this and purchase another HP printer with a USB port and try again.

  4. Comment by: loryzz on date: 24.10.2008 13:55:54

    Your printer is NOT supported by HPLIP.
    http://hplipopensource.com/hplip-web/models/deskjet/hp_deskjet_1000c.html

  5. Comment by: husain on date: 14.07.2009 12:02:19

    Though it's straight fwd n clear but im getting the below error... what could be the solution for this??

    DEPENDENCY AND CONFLICT RESOLUTION
    ----------------------------------
    warning: A previous install of HPLIP is installed and/or running.
    sudo apt-get remove --assume-yes hplip hpijs foomatic-db-hpijs (Removing old HPLIP version)
    warning: HPLIP removal failed. The previous install may have been installed using a tarball or this installer.
    warning: Continuing to run installer - this installation should overwrite the previous one.


    RUNNING POST-PACKAGE COMMANDS
    -----------------------------
    OK


    RE-CHECKING DEPENDENCIES
    ------------------------
    OK


    PRE-BUILD COMMANDS
    ------------------
    OK


    BUILD AND INSTALL
    -----------------
    Running './configure --with-hpppddir=/usr/share/ppd/HP --prefix=/usr --enable-qt4 --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --enable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build'
    Please wait, this may take several minutes...
    error: Configure failed with error: General/unknown error

  6. Comment by: dipinkrishna on date: 18.07.2009 20:51:18

    Install HP printers in Linux ( ubuntu 9.04 jaunty, fedora, debian, redhat, Mandrake/Manrivi, openSUSE, Solaris, FREEBSD) see http://blog.dipinkrishna.info/2009/07/install-hp-printers-in-linux-ubuntu.html

  7. Comment by: MockY on date: 26.08.2009 00:08:46

    I get "Error: option -i not recognized" right after I re-plugin the printer and hit enter. Using Ubuntu 9.04 and HP LaserJet 1018.

  8. Comment by: tangbi on date: 08.09.2009 07:55:01

    Bedankt voor de uitleg!
    Thanks for explanation!

  9. Comment by: Ian on date: 29.09.2009 11:25:59

    "select the "Connection Type" (usually USB) and click on Next"

    Hi - all go`s well until I get to here I can`t select (LPT) port because it`s greyed out ie is not an option.

    I wonder if you had come across this before.

    Thanks Ian

  10. Comment by: loryzz on date: 29.09.2009 11:38:20

    @Ian: make sure to plug in the printer before starting the installation process and to turn on it. Then restart the installation.

  11. Comment by: dbriggs on date: 07.01.2011 14:01:52

    Tried to install a HP DesignJet 500 on LPT1 but guess is unsupported in HPLIP. The Ubuntu/cups driver does not work. ANy ideas where I can get a working Linux driver for the HP Designjet 500, and help on how to install? (already tried the cdnj500 http://www.openprinting.org/driver/cdnj500 but couldn't get it to work either!) Thanks

Leave a comment

All comments must be approved by site administrator.
Please write comments on topic. Spam will be never approved.


Confirmation code

Please take a look to image and insert character into the form field.