Hplip is the software that drives most hp printers. Usually new printers are only supported in newer versions of the software. Canonical doesn't backport new versions packages to older Ubuntu versions, that means that newer drivers are not going to be available in the Software Center of older Ubuntu versions.
As an example yesterday I needed to hook a hp 1005p to a computer running 8.04. I was forced to install a newer hplip than the version available in the repositories. I installed it using the script from the hp page, but I'd like to know other alternatives.
Which is the best (technically, not the easiest) way to install it and why?.
You can use the official hp installer as I did. It will detect that I'm using Ubuntu, uninstall the older drivers, fetch all the dependencies (includind build-essentials), compile the new version, make a nice deb and install it.
Great features:
Problems:
It's a great piece of software, technically it's amazing, but the first two problems are a issue for me.
Installing from the Official Backports in Ubuntu 12.04 LTS
At least for Ubuntu 12.04 LTS there is a relatively new version of HPLIP available in the official
precise-backports
repository. See this answer for how to enable the backports repository (should be enabled by default).You can then install the latest version of HPLIP from the backports repository like so:
IMHO, this should be the “technically” best solution to get a very recent version of HPLIP (at least for Ubuntu 12.04 LTS) as this solution does not pose the problems mentioned in Javier Rivera’s answer.
I am currently running Ubuntu 12.04 (precise), which has version 3.12.2 of hplip. But I found out from the hplip site that I needed at least version 3.12.4 of hplip for my new HP Officejet printer.
I noticed that the next most recent Ubuntu release, 12.10 (quantal), had hplip version 3.12.6, but I didn't want to upgrade my entire system yet just for that. I also preferred to stay closer to a consistent Ubuntu setup than what Javier ended up doing. So here is what I did:
I went to the Ubuntu packages site and downloaded the latest
deb
file from 12.10 (quantal) for my architecture (amd64) for each of the following packages:I then installed each of the
deb
files, in that order, using this command:[Actually, first I tried doing that just for hplip. It failed due to missing dependencies. I kept following the dependencies until I compiled that list.]
I think that is all I need, really, but for completeness, I did the same thing for two more packages:
Now my HP Officejet printer works perfectly, fully supported by genuine Ubuntu packages.
The only thing left to do is to figure out how to configure the files in
/etc/apt
to watch for updates for the quantal packages I installed. I'll update this post if and when I get around to doing that, or maybe someone else can help.To configure the HP LaserJet P1005:
sudo apt-get install hplip
sudo hp-setup -i
If you have old version of hplip, just run
hp-doctor
and follow instructions for update processI think best way is from Software Center. I have done it several times and it was OK.