last updated: Oct 16th, 2011
As promised here are the complete instructions as I have found them online and pieced together to properly install an HP Deskjet in Linux/Ubuntu 10.10 x64. As I mentioned before I did not do this originally and it seemed to work, but then later I started having issues. So here they are, all in one place, in order, complete with reference links to the sources (most are to the HPLIP open source website), these instructions are for you to build from the source files, not from a precompiled binary.
If you want the automated method, the HPLIP website has a great guide that has screen shots on using their binary package to do the install.
****update**** I have run through these instructions again and there is a new HPLIP driver, after installing this some of the wording has changed, if you use this new version and some things look different, don’t worry. I also noticed after following these instructions with the new versions of everything (Ubuntu 11.10 x64 also) that I ended up with two printers! one from HPLIP and another from CUPS… I only figured out it was one from each, as I set the description different when configuring each one! So you may want to test printing before you do the CUPS configuration section and see if it is necessary for you.
On we go!
Once again, anything in BOLD you can copy and paste directly into a terminal window, this is a standard method I use on all my guides.
Part One– updating your system and downloading dependencies and the HPLIP source – information borrowed from here
- ***** PLEASE PLEASE PLEASE ***** unplug the printer’s USB cable from the computer! (or ethernet cable if that is how you are using it).
- If you have not already, now would be a good time to setup your printer and power it on (but don’t plug it in to the computer).
- Open up a terminal window.
- sudo apt-get update && sudo apt-get check && sudo apt-get dselect-upgrade
- This will update your system and check for any missing dependencies you might have already.
- This will remove any existing HPLIP installation, prevent errors or other issues while installing, and make sure you end up with a shiny clean install. Also handy if you are trying to fix a botched install…
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-dev 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 gs python2.6-dev gcc lsb postfix libcups2-dev
- This did popup a window asking me about email settings, I selected no change, or no connection.
- This is the list of dependencies that I have found are required and some optional requirements for HPLIP. Please make sure they all install, if any fail, do a “sudo apt-get install –force-yes [package name]” to try and get them to install.
- If you have not used any of my previous how to guides (not all of them use this), you may not have this DIR created on your machine, this is where I do all my source builds. it may not be the best place for you, depending on your FileSystem setup, I have separate mounts for documents, pictures, music, video, downloads, and a fairly large home directory. If you have limited space in your home directory you may want to put this somewhere else, or if you intend to follow this or any other guide I write, you might want to do a mount redirect to this location, so the data is on a different FS, but the DIR is in the same place. leave a comment if you need help with this, also, I believe I cover this in my Appcelerator guides near the beginning if you want to look there.
- The good news is this will download the most recent release of HPLIP as of this writing, the bad news is that the HPLIP website does not have a direct link to the “newest” so, when they update this project this link will then be out of date, and I probably won’t know about it.
The version used in this guide was posted on Fri, 13 May 2011 03:32:54 GMT. Updated on October 16th 2011February 8th 2012, there was a new version available. Some other good news, after you finish this guide one of the last steps will have you update your installed packages, and the HPLIP software may/should be part of you update repo’s and will then update as updates become available. (on feb 2012 the current repo version for ubuntu was still 3.11.x)
./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib64 --prefix=/usr --enable-udev-acl-rules --enable-qt4 --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --disable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build
- You can leave out the fax build at the end, unless your printer has built in fax capabilities, and if all goes well this will check to make sure you have every prerequisite installed and will set the configuration flags for the build process.
- This step does two things:
- It builds the drivers from source with your user credentials to set the file permissions correctly.
- It installs it using sudo to root credentials which provides read/write permissions to system directories.
- This will add your user name to the “lp” group allowing you access to the printer, you will either need to rerun this line for each user, after logging in as those users, OR type in the user name instead of “$USER” for each user you want to be able to print.
Part two– configuring your printer driver – with information borrowed from here
- Plug your printer back into the computer.
- Head back to your terminal window.
- sudo hp-setup
- Select your connection type, most likely USB.
- and select next.
- If all goes well you shall receive a screen listing all available HP printers.
- If you forgot to plug your printer back in, don’t panic, you can do it now!
Part three– configuring CUPS for your printer – with information borrowed from here
- sudo restart cups
- Pop open your favorite web browser and head over here:
- Click Administration
- select “Manage Printers”
- Select the “old” installation of the printer – should say something about being “unplugged” in the status. (possibly shows “idle” read the note above for more info on that)
- Select Maintenance –> Cancel all jobs
- this should prompt you for a user name and password, you can use any user name and password that you have previously added to the “lp” security group (see near the end of Part one of this post).
- If you accidentally delete the wrong printer, go back to Part two and start over from step #1, then be more careful when you get back to this step…
- Hopefully you have the CUPS management console still open in your web browser, if not go to the following:
You should not need to print a test page unless you had problems somewhere in between the top of this post and the bottom. If there were no issues, save a tree, don’t waste it with a test page, especially if you are using Ubuntu, the default test page will use up a good bit of your color inks. I’ll add an update on to this post if I have any further printer problems.