Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lpr command not found

2,229 views
Skip to first unread message

lina

unread,
Feb 1, 2012, 10:50:01 PM2/1/12
to
Hi,

which package contains the lpr command for printing.

Thanks,


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/CAG9cJmm3FajWtM=qm1AGSVgVYA7TPsjR...@mail.gmail.com

Stan Hoeppner

unread,
Feb 1, 2012, 11:00:01 PM2/1/12
to
On 2/1/2012 9:43 PM, lina wrote:

> which package contains the lpr command for printing.

Surprisingly... lpr

$ aptitude show lpr
Package: lpr
State: not installed
Version: 1:2008.05.17
Priority: optional
Section: net
Maintainer: Adam Majer <ad...@zombino.com>
Uncompressed Size: 410 k
Depends: libc6 (>= 2.7-1), netbase
Suggests: magicfilter | apsfilter, gs
Conflicts: suidmanager (< 0.50)
Replaces: logcheck-database
Provided by: cups-bsd, lprng
Description: BSD lpr/lpd line printer spooling system
This is the BSD printer spooler and associated utilities. You can use
this for local and remote printers.

If you install magicfilter or apsfilter (along with ghostscript), lpr
will be able to automatically handle special file types (such
as Postscript and PDF files).

--
Stan


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4F2A09FD...@hardwarefreak.com

lina

unread,
Feb 1, 2012, 11:20:02 PM2/1/12
to
On Thu, Feb 2, 2012 at 11:58 AM, Stan Hoeppner <st...@hardwarefreak.com> wrote:
> On 2/1/2012 9:43 PM, lina wrote:
>
>> which package contains the lpr command for printing.
>
> Surprisingly... lpr

aha ... thanks,
Archive: http://lists.debian.org/CAG9cJmnD4ydBVM66in55QNbK...@mail.gmail.com

lina

unread,
Feb 1, 2012, 11:40:01 PM2/1/12
to
Thanks,

Before I thought it's some hidden command in some package, did not
realize I should use aptitude show or dpkg -S or apt-cache search.
(actually I was not addicted to use those ways, I used to go to
debian webpage and looking for package.)

well, I have a derived problem, after installing lpr,

$ lpr ProbSet_2.pdf
lpr: lp: unknown printer

$ lpstat
HP-LaserJet-P4015-225 lina 156672 Thursday
02,February,2012 11:35:38 AM SGT

lp ProbSet_2.pdf
request id is HP-LaserJet-P4015-226 (1 file(s))

I don't know what's going on.

thanks,


On Thu, Feb 2, 2012 at 12:27 PM, <kei...@strucktower.com> wrote:
>> Hi,
>>
>> which package contains the lpr command for printing.
>>
>> Thanks,
>>
>
> lpr is the name of the package.
>
> If a progam is installed, you can use:
>
> dpkg -S <program_name>
>
> to find the package name. If it is not installed you can use:
>
> apt-cache search <program_name>
>
> Depending on your setup you may want to look up lp as well.
>
> Keith Ostertag
>


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/CAG9cJmmi63aF5OaqJFkGSVW4...@mail.gmail.com

kei...@strucktower.com

unread,
Feb 1, 2012, 11:50:01 PM2/1/12
to
> Hi,
>
> which package contains the lpr command for printing.
>
> Thanks,
>

lpr is the name of the package.

If a progam is installed, you can use:

dpkg -S <program_name>

to find the package name. If it is not installed you can use:

apt-cache search <program_name>

Depending on your setup you may want to look up lp as well.

Keith Ostertag


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/829cdb8e4025f7199d72...@webmail.strucktower.com

Bob Proulx

unread,
Feb 2, 2012, 1:30:01 AM2/2/12
to
Stan Hoeppner wrote:
> lina wrote:
> > which package contains the lpr command for printing.
>
> Surprisingly... lpr
> Provided by: cups-bsd, lprng
> Description: BSD lpr/lpd line printer spooling system

For whatever reason the folks around here seem to prefer lprng over
lpr. And of course the lpr command is also provided by cups-bsd / cups.
So there seem to be three flavors available.

Bob
signature.asc

Wayne Topa

unread,
Feb 2, 2012, 10:30:02 AM2/2/12
to
On 02/01/2012 11:39 PM, lina wrote:
> Thanks,
>
> Before I thought it's some hidden command in some package, did not
> realize I should use aptitude show or dpkg -S or apt-cache search.
> (actually I was not addicted to use those ways, I used to go to
> debian webpage and looking for package.)
>
> well, I have a derived problem, after installing lpr,
>
> $ lpr ProbSet_2.pdf
> lpr: lp: unknown printer
>
> $ lpstat
> HP-LaserJet-P4015-225 lina 156672 Thursday
> 02,February,2012 11:35:38 AM SGT
>
> lp ProbSet_2.pdf
> request id is HP-LaserJet-P4015-226 (1 file(s))
>
> I don't know what's going on.
>
> thanks,
>
>
> On Thu, Feb 2, 2012 at 12:27 PM,<kei...@strucktower.com> wrote:
>>> Hi,
>>>
>>> which package contains the lpr command for printing.
>>>
>>> Thanks,
>>>

I seem to recall from one of your posts that you are using cups. If
you installed the cups-bsd package, then lpr is already installed.

The lpr package conflicts with the cups-bsd package

$apt-cache show cups-bsd
Package: cups-bsd
Source: cups
Version: 1.5.0-16
Installed-Size: 154
Maintainer: Debian CUPS Maintainers <pkg-cup...@lists.alioth.debian.org>
Architecture: amd64
Replaces: lpr
Provides: lpr
Depends: libc6 (>= 2.4), libcups2 (>= 1.4.0), debconf (>= 0.5) |
debconf-2.0, cups-client (= 1.5.0-16), update-inetd, cups-common
Suggests: cups
Conflicts: lpr, lprng
Description-en: Common UNIX Printing System(tm) - BSD commands
The Common UNIX Printing System (or CUPS(tm)) is a printing system and
general replacement for lpr, lpd and the like. It supports the
Internet Printing Protocol (IPP), and has its own filtering driver
model for handling various document types.
.
This package provides the BSD commands for interacting with CUPS. It
is provided separately to allow CUPS to coexist with other printing
systems (to a small degree).


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4F2AABC...@gmail.com

lee

unread,
Feb 2, 2012, 3:00:02 PM2/2/12
to
lina <lina.l...@gmail.com> writes:

> well, I have a derived problem, after installing lpr,
>
> $ lpr ProbSet_2.pdf
> lpr: lp: unknown printer
>
> $ lpstat
> HP-LaserJet-P4015-225 lina 156672 Thursday
> 02,February,2012 11:35:38 AM SGT
>
> lp ProbSet_2.pdf
> request id is HP-LaserJet-P4015-226 (1 file(s))

What happens when you try 'lpr -PHP-LaserJet-P4015-225 ProbeSet_2.pdf'?


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/87zkd11...@songoku.yagibdah.de

lina

unread,
Feb 2, 2012, 11:00:01 PM2/2/12
to
On Fri, Feb 3, 2012 at 3:53 AM, lee <l...@songoku.yagibdah.de> wrote:
> lina <lina.l...@gmail.com> writes:
>
>> well, I have a derived problem, after installing lpr,
>>
>> $ lpr ProbSet_2.pdf
>> lpr: lp: unknown printer
>>
>> $ lpstat
>> HP-LaserJet-P4015-225   lina            156672   Thursday
>> 02,February,2012 11:35:38 AM SGT
>>
>> lp ProbSet_2.pdf
>> request id is HP-LaserJet-P4015-226 (1 file(s))
>
> What happens when you try 'lpr -PHP-LaserJet-P4015-225 ProbeSet_2.pdf'?

$ lpr -PHP-LaserJet-P4015 ProbSet_2.pdf

it showed me nothing,

In cups the job does not show.

thanks,

>
>
> --
> To UNSUBSCRIBE, email to debian-us...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
> Archive: http://lists.debian.org/87zkd11...@songoku.yagibdah.de
>


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/CAG9cJmm9fFUauE7VXw8_3W7B...@mail.gmail.com

Russell L. Harris

unread,
Feb 3, 2012, 1:20:02 AM2/3/12
to
* Bob Proulx <b...@proulx.com> [120203 05:40]:
> Stan Hoeppner wrote:
> For whatever reason the folks around here seem to prefer lprng over
> lpr. And of course the lpr command is also provided by cups-bsd /
> cups. So there seem to be three flavors available.

There is a bit more to this matter than the package "lpr".

About a decade ago, the package lprng ("ng" meaning "next generation")
fixed most of the problems of the package lpr. Most importantly, the
author of lprng carefully documented the procedure for configuring the
printing system. And though lprng was carefully wrought and worked
well, lprng nonetheless was an elaborate patch of a legacy printing
system. In those days, getting printing configured properly was a
somewhat complex post-installation process.

Then cups was designed, and getting printing working properly in Linux
suddenly was a fairly simple matter. Things went well until cups was
purchased by Apple, since which event there have been some
improvements in printing configuration and management and some
regressions. And I miss the marvelous detailed cups test page, which
Apple replaced with a primitive and ugly version.

Today, "lpr" simply is one of the commands which cups recognizes;
that is, cups controls the printer, and "lpr" is an element of the
command set of cups.

For example, I print a man page on the default laser printer with the
command string "man -t packagename | lpr". And I print address labels
on a dot-matrix printer with the command string "lpr -Poki labels".

RLH


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/2012020306...@cromwell.tmiaf

Anthony Campbell

unread,
Feb 3, 2012, 6:00:02 AM2/3/12
to
On 03 Feb 2012, Russell L. Harris wrote:
>
> There is a bit more to this matter than the package "lpr".
>
> About a decade ago, the package lprng ("ng" meaning "next generation")
> fixed most of the problems of the package lpr. Most importantly, the
> author of lprng carefully documented the procedure for configuring the
> printing system. And though lprng was carefully wrought and worked
> well, lprng nonetheless was an elaborate patch of a legacy printing
> system. In those days, getting printing configured properly was a
> somewhat complex post-installation process.
>
> Then cups was designed, and getting printing working properly in Linux
> suddenly was a fairly simple matter. Things went well until cups was
> purchased by Apple, since which event there have been some
> improvements in printing configuration and management and some
> regressions. And I miss the marvelous detailed cups test page, which
> Apple replaced with a primitive and ugly version.
>
> Today, "lpr" simply is one of the commands which cups recognizes;
> that is, cups controls the printer, and "lpr" is an element of the
> command set of cups.
>
> For example, I print a man page on the default laser printer with the
> command string "man -t packagename | lpr". And I print address labels
> on a dot-matrix printer with the command string "lpr -Poki labels".
>
> RLH
>


Interesting: I didn't know about the purchase by Apple. I always
preferred lprng to cups but for some reason one of my laptops no longer
gave me /dev/lp0 so I was forced to use cups on that machine. I had some
problems with cups last summer (had to take the USB lead out and put it
back after each printing) but at present things seem to be more or less
all right. I still have lprng on my other machines and don't intend to
change unless I have to.

AC

--
Anthony Campbell - a...@acampbell.org.uk
Microsoft-free zone - Using Debian GNU/Linux
http://www.acampbell.org.uk - sample my ebooks
at http://www.smashwords.com/profile/view/acampbell


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/2012020310...@ithaca.acampbell.org.uk

Vincent Lefevre

unread,
Feb 3, 2012, 7:00:01 AM2/3/12
to
On 2012-02-02 11:43:24 +0800, lina wrote:
> which package contains the lpr command for printing.

There are several ones:

$ apt-file -x search 'bin/lpr$'
cups-bsd: /usr/bin/lpr
cups-dbg: /usr/lib/debug/usr/bin/lpr
gnuspool: /usr/bin/lpr
lpr: /usr/bin/lpr
lprng: /usr/bin/lpr

Not sure what's the best one. With remote print servers, recent CUPS
versions (as those in Debian/unstable) are unfortunately broken.

--
Vincent Lefèvre <vin...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/2012020311...@xvii.vinc17.org

Russell L. Harris

unread,
Feb 3, 2012, 7:00:01 AM2/3/12
to
* Anthony Campbell <a...@acampbell.org.uk> [120203 11:21]:
> Interesting: I didn't know about the purchase by Apple. I always
> preferred lprng to cups but for some reason one of my laptops no longer
> gave me /dev/lp0 so I was forced to use cups on that machine. I had some
> problems with cups last summer (had to take the USB lead out and put it
> back after each printing) but at present things seem to be more or less
> all right. I still have lprng on my other machines and don't intend to
> change unless I have to.

I came to Linux as a result of a disaster caused by one of the few
genuine Y2K bugs, which caused M$ Word for M$-DO$ to write garbage to
the data files. That event taught me the potential cost of running a
proprietary system, and, in particular, a system in which data is
stored in anything other than plain text.

At that relatively-early date in the history of Linux (my first system
was "Potato"), I was very glad to have lprng. I never recall having
difficulty with lprng, and I was apprehensive about the switch to cups.
Indeed, upon the acquisition of cups by Apple, and in view of my
personal experience with several Macinto$h systems, I gave thought to
returning to lprng. But as lprng loses popularity, maintenance
becomes an issue. At this point, I think that if Apple ruins cups,
the best approach to recovery would be to branch cups from the
pre-Apple release, rather than to return to lprng.

RLH


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/2012020311...@cromwell.tmiaf

Klaus Jantzen

unread,
Feb 3, 2012, 7:50:02 AM2/3/12
to
Vincent Lefevre wrote:
> On 2012-02-02 11:43:24 +0800, lina wrote:
>
>> which package contains the lpr command for printing.
>>
>
> There are several ones:
>
> $ apt-file -x search 'bin/lpr$'
> cups-bsd: /usr/bin/lpr
> cups-dbg: /usr/lib/debug/usr/bin/lpr
> gnuspool: /usr/bin/lpr
> lpr: /usr/bin/lpr
> lprng: /usr/bin/lpr
>
> Not sure what's the best one. With remote print servers, recent CUPS
> versions (as those in Debian/unstable) are unfortunately broken.
>
>
Through this discussion I found out that lpr works in my system.
Only: I have to specify the printer with the option -P.
As I have only one printer I would like to set this as system default.
Where can I do that?

Thanks.

--
KDJ.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4F2BD79A...@t-online.de

lina

unread,
Feb 3, 2012, 8:10:02 AM2/3/12
to
Why I have never thought of bring my laptop to the printer nearby and
plug the cable to use it.

Thanks for reminding me this.

> all right. I still have lprng on my other machines and don't intend to
> change unless I have to.
>
> AC
>


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4F2BDA8D...@gmail.com

lina

unread,
Feb 3, 2012, 8:20:01 AM2/3/12
to
Happy so earlier, there is no output cable except one for power, one for
internet.

>
>> all right. I still have lprng on my other machines and don't intend to
>> change unless I have to.
>>
>> AC
>>
>


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4F2BDD7...@gmail.com

Dom

unread,
Feb 3, 2012, 8:40:02 AM2/3/12
to
On 03/02/12 12:48, Klaus Jantzen wrote:
> Vincent Lefevre wrote:
>> On 2012-02-02 11:43:24 +0800, lina wrote:
>>> which package contains the lpr command for printing.
>>
>> There are several ones:
>>
>> $ apt-file -x search 'bin/lpr$'
>> cups-bsd: /usr/bin/lpr
>> cups-dbg: /usr/lib/debug/usr/bin/lpr
>> gnuspool: /usr/bin/lpr
>> lpr: /usr/bin/lpr
>> lprng: /usr/bin/lpr
>>
>> Not sure what's the best one. With remote print servers, recent CUPS
>> versions (as those in Debian/unstable) are unfortunately broken.
>>
> Through this discussion I found out that lpr works in my system.
> Only: I have to specify the printer with the option -P.
> As I have only one printer I would like to set this as system default.
> Where can I do that?
>
> Thanks.
>

You can set the default printer to use for print jobs with:

lpadmin -d $printername

--
Dom


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4F2BE323...@rpdom.net

Klaus Jantzen

unread,
Feb 3, 2012, 12:40:01 PM2/3/12
to
Dom wrote:
> On 03/02/12 12:48, Klaus Jantzen wrote:
>> Vincent Lefevre wrote:
>>> On 2012-02-02 11:43:24 +0800, lina wrote:
>>>> which package contains the lpr command for printing.
>>>
>>> There are several ones:
>>>
>>> $ apt-file -x search 'bin/lpr$'
>>> cups-bsd: /usr/bin/lpr
>>> cups-dbg: /usr/lib/debug/usr/bin/lpr
>>> gnuspool: /usr/bin/lpr
>>> lpr: /usr/bin/lpr
>>> lprng: /usr/bin/lpr
>>>
>>> Not sure what's the best one. With remote print servers, recent CUPS
>>> versions (as those in Debian/unstable) are unfortunately broken.
>>>
>> Through this discussion I found out that lpr works in my system.
>> Only: I have to specify the printer with the option -P.
>> As I have only one printer I would like to set this as system default.
>> Where can I do that?
>>
>> Thanks.
>>
>
> You can set the default printer to use for print jobs with:
>
> lpadmin -d $printername
>
Thanks, that did it.

--
KDJ.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4F2C1A20...@t-online.de
0 new messages