HP Logo
HP Logo
Tux
    Home
    About
  • Features
  • Screenshots
  • FAQs
  • About HPLIP
  • Setup and Installation
  • Download HPLIP
  • Installation Instructions
  • System Requirements
  • Supported Devices
  • Usage and Support
  • Support
  • How-Tos
  • Troubleshooting
  • Release Notes
  • Resources
  • Technical Documentation
  • Sourceforge Project Page
  • Software License
  • Other Support Information
  • Contacts
Home > Installation > Manual Install > Linux Distributions > LFS/BLFS

Manual Build and Install Instructions for Linux From Scratch

Step 1: Installation Prerequisite Steps

Important

This process has not been tested on HPLIP 2.x

Note

This process has not been tested by the HPLIP Team and is not supported.

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.

Installing hplip-2.7.9 on an LFS system

This document describes the installation of hplip-1.7.1 on a Linux from Scratch (LFS)/Beyond Linux from Scratch (BLFS) setup. We have OfficeJet usb printers in mind. Printing and scanning was found to work well on the HP-OfficeJet 5510 all-in-one.

Some system components of the LFS/BLFS build on which this experience is based are: gcc-4.0.3 ; glibc-2.3.6; udev-088; Linux-2.6.16.5; python-2.4.3; libusb-0.1.12; usbutils-0.72; xfree86-4.5.0; gimp-2.2.10; cups-1.1.23; ESP_Ghostscript-8.15.1; sane-1.0.18; xsane-0.994; foomatic-3.1.0.

The procedure installs hplip /usr.

It is assumed that

  1. all the system requirements for the building of hplip are

    met. In particular, CUPS should be working on its own;

  2. hplip-2.7.9.tar.gz has been untarred into a directory we

    shall call "Build";

  3. you are now in Build.

The various steps are described below.

First as an unprivileged user:

$ cd hplip-2.7.9
$ ./configure --prefix=/usr --disable-pp-build --enable-foomatic-ppd-install
$ make

Configuration notes:

--disable-pp-build: if your printers do not connect to the parallel
port.
--enable-foomatic-ppd-install: if you wish to use foomatic-ppd-files. At
the moment this database covers a larger variety of HP-printers.

You should add: --disable-network-build if you do not have net-snmp installed.

Next, as root:

# make install

Find the foomatic filter script "foomatic-rip" wherever it was installed. If it is not installed, download from

Openprinting.org

and do

# cp foomatic-rip /usr/lib/cups/filter/

Now

# cd /usr/share/cups/model/
# ln -s /usr/share/ppd/HP/* foomatic-ppds

Edit the file /etc/udev/rules.d/25-lfs.rules:

  1. Add the following rule (from SUSE) as a single line to the very top:

SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"

  1. Comment out the rules

KERNEL=="lp[0-9]*", GROUP="lp" BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k", GROUP="lp"

by inserting a hash (#) in front of them

  1. Make sure that your HP-device is plugged in and turned on. Run the following script to stop the udev-daemon:
# T=`pidof -x udevd`; kill $T

Then start the udev-daemon again by running:

# /etc/rc.d/init.d/udev start

When udev is started, run:

# lsusb

and see if your device has been detected. If "lsusb" is not available (it is part of "usbutils") you could also do:

If there is something, your device is seen correctly for the purposes of hplip.

Explanations:

CUPS has to see the foomatic filter. That is why it has to be copied, or symbolically linked, into the file /usr/lib/cups/filter/ If this is not done, printing with CUPS will not be possible.

CUPS will look for the Foomatic ppd's in /usr/share/cups/model/ If the symbolic link is not made you will be unable to configure your printer.

The addition of the SUSE-rule in /ets/udev/rules.d/25-lfs.rules will set up your usb devices properly for hplip. It is important for this rule to be at the top of the list. The rules you comment out will be redundant.

Before your system can implement the changes in udev-rules, it is necessary to re-start udev by running the scripts as indicated.

You may now follow the hplip documentation to set up the program.

Hopefully some of this is of value to users of other Linux distributions as well.

Documentation provided by Niko Sauer.


Step 2: Install Dependency Packages

Use the Other Linux Distros page for a list of required depencency packages.

Use your distro documentation for installing the packages.


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-2.8.2.tar.gz

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

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

Example:

cd hplip-2.8.2

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

PPD Install:

32 bit distro users:

./configure --prefix=/usr --enable-foomatic-ppd-install --with-hpppddir=<hpppddir path here>  --enable-foomatic-rip-hplip

64 bit distro users

./configure --prefix=/usr --enable-foomatic-ppd-install --with-hpppddir=<hpppddir path here>  --enable-foomatic-rip-hplip --libdir=/usr/lib64

Note

DRV Install:

32 bit distro users:

./configure --prefix=/usr --enable-foomatic-drv-install --with-drvdir=<drvdir path here>  --with-hpppddir=<hpppddir path here>  --enable-foomatic-rip-hplip

64 bit distro users

./configure --prefix=/usr --enable-foomatic-drv-install --with-drvdir=<drvdir path here>  --with-hpppddir=<hpppddir path here>  --enable-foomatic-rip-hplip --libdir=/usr/lib64

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

A. This step will install HPLIP.

Enter this command:

su -c "make install"

Step 7: Post Installation Step(s)

A. 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


Page last updated: Wed Jan 30 14:56:16 2008; HPLIP Version: 2.8.2

Legal Notices Copyright © 2003-2007, Hewlett-Packard Development Company, L.P. Contact Site Maintainer