cybernightlife [e-mail] [forums] [home] [return]

Upgrading HPLIP on SimplyMEPIS 6.0

HPLIP is a Linux printing solution developed at Hewlett-Packard that works on most Hewlett-Packard printers, and most other printers that utilize Hewlett-Packard's PCL (Printer Control Language) for printing.

The package contains printer drivers for many Hewlett-Packard devices (including standalone printers, photo printers, and all-in-one devices), a SANE module for scanning for all-in-one-devices, a disk storage module for devices incorporating card readers built in to all-in-one devices, some Python scripts, and a GUI control center (written in Python and utilizing the Qt libraries)

HPLIP is updated on a regular basis as more HP models are supported. Upgrading to the latest version ensures that not only will your HP device be supported, but that any problems with HPLIP will be resolved for your HP device, but should you purchase a new HP device, that printer will be supported.

Download the latest version from source

SimplyMEPIS 6.0 comes with version 0.9.7 of HPLIP. This version is quite dated, but will suffice if you have a relatively older Hewlett-Packard printer or all-in-one device. However, I recommend downloading and installing the latest HPLIP from source to ensure that future HP devices will work with your SimplyMEPIS installation.

Sure, you could use synaptic to download the latest hplip updates, but then any dependencies that need to be updated are downloaded as well. However, downloading the source package (in bz2 and gz compressed files) does not require downloading any dependencies.

Note: This package has grown to a ten megabyte file as of this writing. If you are on a dialup connection, I recommend downloading the source package as opposed to waiting for dependencies to download when using synaptic.

Check for installed dependencies

Before compiling HPLIP from source, be sure to have the following dependencies installed on your MEPIS distribution. I recommend installing these using synpatic to ensure that dependencies are resolved.

Mixing Ubuntu CD/DVD-ROMs and Debian CD/DVD-ROMs with MEPIS CD/DVD-ROMs

If you have a Ubuntu 6.06 (Dapper drake) DVD-ROM available, the dependent packages can be found there, too. You can install the dependent packages from this DVD, but you will need to do a lot of work, because you will be manually installing these packages using the dpkg command line utility. The synaptic package from SimplyMEPIS will not work with this or any Ubuntu DVD-ROM or CD-ROM.

What is more interesting is that the SimplyMEPIS DVD-ROM actually works with Ubuntu installations, and not the other way around.

However, Debian CDs and DVDs, especially the Sarge distribution, can be freely incorporated into MEPIS and Ubuntu distributions. However, be careful about the version numbers of the packages you are installing.

When installing the development packages (i.e. those packages containing -dev in the filename), be sure the version number of the development package matches exactly with the corresponding non-development package.

HPLIP depends upon the following packages and their corresponding development packages (the ones with the -dev in the filenames):

  • libusb and libusb-dev for USB device support
  • net-snmp and net-snmp-dev for network support
  • python for the basic HPLIP functionality (python-dev is optional here, but fortunately has been installed with SimplyMEPIS)
  • python-qt3 for the Qt bindings and the HP control panel. This should already be on the SimplyMEPIS CD/DVD.
  • coreutils
  • lsb-base for Linux Standards Base support
  • cupsys and cupsys-dev make up the printing system
  • libssl and libssl-dev for Secure Sockets Layer support
  • adduser
  • libc6 and libc6-dev, which is a basic set of libraries for Linux to function.

Many of these dependencies should have already been installed with SimplyMEPIS, and updates (e.g. development packages) provided by the Ubuntu repositories.

Unpack the archive and compile HPLIP

Once you have downloaded the archive, place the archive into an empty directory, change to that directory, and unpack it there.

Let us say you created a directory for downloads called Packages, and downloaded HPLIP (version 1.6.12) to this directory. To do this, open a terminal such as Konsole and type:

cd Packages
tar -zxvf hplip-1.6.12.tar.gz

If you have downloaded the bz2 package, type tar -jxvf hplip-1.6.12.tar.bz2 instead. The z tells tar to decompress the archive using gzip. If you have downloaded a bz2 package, the j tells tar to use bzip to decompress the archive. Next, the x tells tar to extract the entire archive. The v tells tar to be verbose about it, i.e. tell you the names of all the files in the archive as tar is extracting them. Finally, the f tells tar to use the HPLIP archive for the process.

The archive will be unpacked into a new subdirectory called hplip-1.6.12, assuming you have downloaded version 1.6.12 of that file. The actual directory name will vary depending upon the version you have downloaded to your system.

Once tar has finished unpacking the archive, the HPLIP package is now in your user account, and conveniently located in its own subdirectory. When you downloaded the package from the Sourceforge site, you have downloaded the source code package.

Definitions: For those of you who are not familiar with computer programming, source code is the software as it is written in one or more programming languages such as C, C++, Java, Python, or Perl. The files contained in source code packages are readable with any text editor, and for it to be executable on you system, the files have to be compiled into binary form or interpreted by a language interpreter.

When a source code package has been unpacked as described above, the package has to be built on your machine for it to be installed. To facilitate this building, the make utility is utilized, and that utility uses a makefile, or a script containing instructions on how to build the package, and which parts to build.

But since no two machines are alike, there has to be some way to create the makefile for your machine. Fortunately, most source code packages you download, including this one, contain a configure script, which does just that: configures the source code to what system software (and corresponding development packages) you have installed on your SimplyMEPIS installation. (This holds true for any other Linux/UNIX installation.)

This is why I recommend you have the development packages installed for each software package you have installed on your SimplyMEPIS system.

Now that the source code package has been installed, using the same terminal, change to the directory named hplip-1.6.12 or whatever version you have downloaded.

We are now ready to start the building process. If you have never compiled a package from source, there is good news. It is a simple process, and it goes like this:

cd hplip-1.6.12
./configure --prefix=/usr
make

That's it! Simply change to the directory where the HPLIP package is installed, tell your system to configure the source code so it can properly upgrade HPLIP on your SimplyMEPIS installation (HPLIP is installed to the /usr directory), and tell your system to build the package. If everything goes as planned (and you have installed the dependencies described earlier on this page), the HPLIP upgrade should be built where it will be used...on your system!

Do not worry about the warning messages that appear during the building process. These messages are for the programmers involved in the HPLIP project. You can safely ignore these. :-)

When your system is finished building HPLIP, you are now ready to install the upgrade. Simply type in su, enter your administrator password, and you should see the # prompt on your terminal window. Then type make install.

Once your system has finished installing the upgrade, simply close all windows and reboot your system. HPLIP has been upgraded and is now ready to use. The good news here is that under SimplyMEPIS, no further configuration is needed.

Trademarks Acknowledged

  • SimplyMEPIS and MEPIS are registered trademarks of MEPIS, LLC
  • Linux is a registered trademark of Linus Torvalds
  • Ubuntu and Kubuntu are registered trademarks of Canonical, Inc
  • Debian is a registered trademark of Software for the Public Interest
  • Hewlett-Packard and PCL are registered trademarks of the Hewlett-Packard Development Company
  • Qt is a trademark of Trolltech
  • all other trademarks are properties of their respective owners

Copyright 1996-2007 Patrick G Horneker.
Distributed under Free Documentation License, because the greatest enemy we have in this world is ignorance.