Chinaunix首页 | 论坛 | 博客
  • 博客访问: 424440
  • 博文数量: 53
  • 博客积分: 2746
  • 博客等级: 少校
  • 技术积分: 829
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-14 10:41
文章分类

全部博文(53)

文章存档

2016年(2)

2013年(1)

2012年(7)

2011年(10)

2010年(5)

2009年(20)

2008年(8)

我的朋友

分类: LINUX

2009-05-15 14:14:41

一、下载源码:

    wget

二、解压: tar xvf LPRng-3.8.10.tgz

三、改configuer

    删掉configuer 中的第1545和1546行中的“-Werror”,就是让有警告也要断续编译。不然会出现: ./common/lpf.c:191: warning: conflicting types for built-in function 'log',面退出编译。

三、配置:

    ./configure --build=i686-linux --target=arm-linux-gnu CC=arm-linux-gcc  --host=arm-linux --prefix=/

四、编译:

    make

五、考执文件和启动配置环境

    a、cp lpd lpc /usr/sbin;cp lpr lprm lpq /usr/bin

    b、cp lpd.conf lpd.perms mime.types /etc/

    c、创建编写/etc/printcap:

       Starprinter:\

       :done_jobs=\

       :ml#0:\

       :mx#0:\

       :sd=/printer:\

       :af=/printer/usblp.acct:\

       :sh:\ :lp=/dev/usb/lp0:

    d、根据printcap创建打印路径:

       mkdir /printer

    e、确保/etc/hosts里有:

       127.0.0.0 #不然lpr连不上lpd而出错

    f、增加打印机用户:

       addusr lp

    g、确保/dev下有 lp结点文件,如:lp0、lp1。

六、执行:

    1、先执行 lpd ,正常的话ps 看会有lpd waiting;

    2、再cat /etc/printcap | lpr ,若正常打印机会打印出printcap的内容。

end

阅读(1829) | 评论(4) | 转发(0) |
给主人留下些什么吧!~~

long_ming2011-11-30 22:08:59

cltnet: 编译出现如下错误
[root@tc LPRng-3.8.10]# make
if [ "UTILS" != po -o "no" != "no" ] ; then \
                cd UTILS; m.....
你的编译环境是什么?比如在什么linux下编译,是什么gcc?

cltnet2011-11-29 17:07:35

编译出现如下错误
[root@tc LPRng-3.8.10]# make
if [ "UTILS" != po -o "no" != "no" ] ; then \
                cd UTILS; make localedir=/usr/local/LPRng/share/locale \
                        DESTDIR= all ; \
        fi
/bin/sh: -c: line 1: syntax error: unexpected end of file

chinaunix网友2010-05-21 16:56:34

执行checkpc检查时通过了的 执行/usr/local/sbin # lpstat -t scheduler is running system default destination: Starprinter printer Starprinter@localhost unknown state. enabled since Jan 01 00:04 2000. available Printer: Starprinter@localhost Queue: no printable jobs in queue

chinaunix网友2010-05-21 12:34:18

你好,我参照你上面移植了LPRNG-3.8.10,出现如下错误 / # cat /etc/printcap |lpr Status Information: sending job 'root@localhost+207' to Starprinter@localhost connecting to 'localhost', attempt 1 connected to 'localhost' requesting printer Starprinter@localhost sending control file 'cfA207localhost.localdomain' to Starprinter@localhost job 'root@localhost+207' transfer to Starprinter@localhost failed error 'NONZERO RFC1179 ERROR CODE FROM SERVER' with ack 'ACK_RETRY' sending str '^B166 cfA207local