Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-12-2005, 03:00 PM
|
#1
|
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 143
Rep:
|
less produces no output
I have a firewall running Slackware v10.0 and, recently, I noticed that there's something wrong with the less program. What follows is an example of execution:
Code:
zpalmer@dib:/usr/man$ less
Missing filename ("less --help" for help)
zpalmer@dib:/usr/man$ less --help
zpalmer@dib:/usr/man$ less /etc/resolv.conf
zpalmer@dib:/usr/man$ cat /etc/resolv.conf
nameserver 66.118.80.5
nameserver 69.43.32.27
zpalmer@dib:/usr/man$ man resolv.conf
Error executing formatting or display command.
System command (cd /usr/man && (echo ".pl 1100i"; /bin/gunzip -c '/usr/man/man5/resolver.5.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -S -mandoc | /usr/bin/less -is) exited with status 256.
No manual entry for resolv.conf
(Next is the exact same command, minus the call to less.)
zpalmer@dib:/usr/man$ (cd /usr/man && (echo ".pl 1100i"; /bin/gunzip -c '/usr/man/man5/resolver.5.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -S -mandoc)
a correct listing of the resolv.conf man page
zpalmer@dib:/usr/man$
To the best of my knowledge, "less" has never worked on this machine. I have a webserver, however, which is also running Slackware 10.0. I performed the install the same way. It has a working copy of less so, not knowing exactly what is going on, I copied the less binary from the web server to the firewall. I saw no change in behavior, so I assume that the problem isn't with the less binary itself but something on which it relies.
However, I have run swaret to ensure that all of the firewall's components are up-to-date. Does anyone have a clue what's going on?
More information is, of course, available upon request. Thanks!
- Zachary Palmer
|
|
|
|
05-12-2005, 03:13 PM
|
#2
|
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
try:
Code:
ls -al `which less`
|
|
|
|
05-12-2005, 03:22 PM
|
#3
|
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Re: less produces no output
Quote:
Originally posted by tvynr
However, I have run swaret to ensure that all of the firewall's components are up-to-date. Does anyone have a clue what's going on?
More information is, of course, available upon request. Thanks!
|
Updated to a 2.6 kernel?
Have a close look at your udev settings, have a google,
there's been a few threads with that problem.
Cheers,
Tink
|
|
|
|
05-12-2005, 03:25 PM
|
#4
|
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 143
Original Poster
Rep:
|
What about it?
Code:
root@dib:~# ls -al `which less`
-rwxr-xr-x 1 root bin 100924 2005-04-20 21:56 /usr/bin/less*
What about it? I'm afraid I'm not the most skilled Linux user in the world... if there's something there I should be seeing, I've missed it.
Thanks for the response, tho. Does this result help?
|
|
|
|
05-12-2005, 03:32 PM
|
#5
|
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
I just wanted to check both its size and location... and it seems to be fine. One option (a workaround) is to actually symlink /usr/bin/less to /usr/bin/more, if you don't mind using more instead of less. 
|
|
|
|
05-12-2005, 03:34 PM
|
#6
|
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 143
Original Poster
Rep:
|
Re: Re: less produces no output
Quote:
Originally posted by Tinkster
Updated to a 2.6 kernel?
Have a close look at your udev settings, have a google,
there's been a few threads with that problem.
Cheers,
Tink
|
I've had a couple of Googles, but I'm afraid I'm suffering from a certain degree of ineptitude at the moment. I'm not sure what the hotplug system would have to do with less not producing output... the contents of my udev.conf are as follows (excluding comments):
Code:
udev_root="/dev/"
udev_db="/dev/.udev.tdb"
udev_rules="/etc/udev/rules.d"
default_mode="0660"
default_owner="root"
default_group="root"
udev_log="no"
I've never modified it before.
It's also worth noting that both the web server and the firewall are running 2.6 kernels, but only the web server's "less" works correctly. The web server is running kernel 2.6.7; the firewall is running kernel 2.6.9.
|
|
|
|
05-12-2005, 03:48 PM
|
#7
|
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 143
Original Poster
Rep:
|
Quote:
Originally posted by Matir
I just wanted to check both its size and location... and it seems to be fine. One option (a workaround) is to actually symlink /usr/bin/less to /usr/bin/more, if you don't mind using more instead of less.
|
I'll bear that in mind, thanks. I'd really like to find out what the problem is... I never feel right when I circumvent a problem rather than solving it... but a temp fix is better than nothing.
Is there some library that less uses that could be damaged?
|
|
|
|
05-12-2005, 03:53 PM
|
#8
|
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
You could try 'ldd /usr/bin/less' and see what it shows in terms of libraries.
|
|
|
|
05-12-2005, 04:04 PM
|
#9
|
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 143
Original Poster
Rep:
|
ldd /usr/bin/less
Code:
zpalmer@dib:~$ ldd /usr/bin/less
linux-gate.so.1 => (0xffffe000)
libncurses.so.5 => /lib/libncurses.so.5 (0xb7fa6000)
libc.so.6 => /lib/libc.so.6 (0xb7e88000)
libgpm.so.1 => /lib/libgpm.so.1 (0xb7e82000)
/lib/ld-linux.so.2 (0xb7feb000)
I'm not quite sure what I'm looking at here. The only libraries I recognize are libc and libncurses. I doubt there's anything wrong with libc.
|
|
|
|
05-12-2005, 04:28 PM
|
#10
|
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Re: Re: Re: less produces no output
Quote:
Originally posted by tvynr
I've had a couple of Googles, but I'm afraid I'm suffering from a certain degree of ineptitude at the moment. I'm not sure what the hotplug system would have to do with less not producing output... the contents of my udev.conf are as follows (excluding comments):
It's also worth noting that both the web server and the firewall are running 2.6 kernels, but only the web server's "less" works correctly. The web server is running kernel 2.6.7; the firewall is running kernel 2.6.9.
|
That's because it uses tty/pty which are set-up in the
kernel ... I've googled on your behalf and found the
explanation in the LQ-wiki :P
Quote:
Q) I'm running Slackware 10.0. I updated my kernel to 2.6.X. Where have all my devices gone? Why is 'man XYZ'/'less XYZ' not working and giving me errors?
A) The 2.6 series of kernels use 'udev' to manage the devices. Unlike the devfs of old, udev works entirely in userspace and only creates nodes for devices that exist (and it does so dynamically, so if you remove the device, the nodes will be removed. Makes /dev a lot a smaller and easier to figure out what's what. For more, information on udev, see the udev FAQ (http://www.kernel.org/pub/linux/util...tplug/udev-FAQ))
udev also allows you to write rules, so that you can, theoretically, assign any name to a device that is plugged in, perhaps based on criteria such as it's name, or description (e.g. my Creative Muvo2 may be /dev/sda or /dev/sdb, but I have a rule that always creates a symlink at /dev/muvo to wherever the device is plugged in)
But what does this have to do with man page or less errors? Unfortunately, one of the rules in the udev-026-i486-1.tgz package that ships with Slackware 10.0 is wrong, causing problems with the terminals that less (which man uses) relies on. Either:
Taken from this thread (http://www.linuxquestions.org/questi...hreadid=260641):
In /etc/rc.d/udev.rules change:
KERNEL="tty[p-za-e][0-9a-f]*", NAME="tty/s%n", SYMLINK="%k"
to:
KERNEL="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK="%k"
|
Cheers,
Tink
|
|
|
|
05-12-2005, 04:58 PM
|
#11
|
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 143
Original Poster
Rep:
|
Re: Re: Re: Re: less produces no output
Quote:
Originally posted by Tinkster
That's because it uses tty/pty which are set-up in the
kernel ... I've googled on your behalf and found the
explanation in the LQ-wiki :P
Cheers,
Tink
|
I appreciate the effort you've put forward on my behalf. However, I found a similar Google result and applied the fix. Unfortunately, it still doesn't work. The pertinent section of my udev.rules is as follows:
Code:
{snip}
# tty devices
KERNEL="console", NAME="%k", GROUP="tty", MODE="0600"
KERNEL="tty", NAME="%k", GROUP="tty", MODE="0666"
KERNEL="tty[0-9]*", NAME="vc/%n", SYMLINK="%k", GROUP="tty"
KERNEL="ttyS[0-9]*", NAME="tts/%n", SYMLINK="%k", GROUP="tty"
KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0600"
KERNEL="ippp0", NAME="%k", GROUP="tty"
KERNEL="isdn*", NAME="%k", GROUP="tty"
KERNEL="dcbri*", NAME="%k", GROUP="tty"
KERNEL="ircomm*", NAME="%k", GROUP="tty"
# pty devices
KERNEL="ptmx", NAME="%k", GROUP="tty", MODE="0666"
KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k", GROUP="tty"
KERNEL="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK="%k", GROUP="tty"
{snip}
As you can see, I've changed "tty/s%n" to "pty/s%n". However, I still don't get anything from less:
Code:
root@dib:~# man less
Error executing formatting or display command.
System command /bin/bzip2 -c -d /usr/man/cat1/less.1.bz2 | /usr/bin/less -is exited with status 256.
root@dib:~# /bin/bzip2 -c -d /usr/man/cat1/less.1.bz2 | more
(works)
Is there perhaps something else wrong with one of those lines on my system?
Thanks again for the support.
|
|
|
|
05-12-2005, 05:32 PM
|
#12
|
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Silly question, did you reboot (re-run udevstart) after
those changes?
|
|
|
|
05-12-2005, 05:53 PM
|
#13
|
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 143
Original Poster
Rep:
|
Didn't work...
A very valid question... I didn't know I needed to do that. However...
Code:
root@dib:~# udevstart
root@dib:~# man less
Error executing formatting or display command.
System command /bin/bzip2 -c -d /usr/man/cat1/less.1.bz2 | /usr/bin/less -is exited with status 256.
Thanks, tho.
|
|
|
|
05-12-2005, 06:17 PM
|
#14
|
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
check the perms on the devices, and see whether your normal
user has proper access rights ... just for good measure. I'm quite
certain that this is the cause of the problem since I had that trouble
myself a few months ago when I updated my wifes comp to 2.6
because of the lacking support for cx8800 chipsets in 2.4s v4l2.
Cheers,
Tink
|
|
|
|
06-09-2005, 11:06 PM
|
#15
|
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 143
Original Poster
Rep:
|
Update: Almost Fresh Install, Similar Problems
I recently had to reinstall my firewall from scratch (hard drive blew up on me), so I got out the Slackware 10.0 CDs and went to work. After I got it up and running, I checked out less: it was working fine. I then used the man pages to refresh me on the specifics of bash, since I didn't have a full backup of all of my firewall scripts. All of this went seamlessly.
Last night, I told swaret to update everything I had installed on my system and went to bed. After I got up today, I took a look at the system and everything was running much more smoothly (upgrading SMB fixed one problem I was experiencing, etc.). However, at this point, less stopped working. I made the suggested changes to udev.rules and ran udevstart, but nothing has changed.
Does this tidbit help at all?
Cheers
|
|
|
|
All times are GMT -5. The time now is 07:10 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|