分类: 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
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