LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 05-12-2005, 03:00 PM   #1
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Rep: Reputation: 15
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
 
Old 05-12-2005, 03:13 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
try:
Code:
ls -al `which less`
 
Old 05-12-2005, 03:22 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 05-12-2005, 03:25 PM   #4
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
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?
 
Old 05-12-2005, 03:32 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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.
 
Old 05-12-2005, 03:34 PM   #6
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
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.
 
Old 05-12-2005, 03:48 PM   #7
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
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?
 
Old 05-12-2005, 03:53 PM   #8
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
You could try 'ldd /usr/bin/less' and see what it shows in terms of libraries.
 
Old 05-12-2005, 04:04 PM   #9
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
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.
 
Old 05-12-2005, 04:28 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 05-12-2005, 04:58 PM   #11
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
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.
 
Old 05-12-2005, 05:32 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Silly question, did you reboot (re-run udevstart) after
those changes?
 
Old 05-12-2005, 05:53 PM   #13
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
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.
 
Old 05-12-2005, 06:17 PM   #14
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 06-09-2005, 11:06 PM   #15
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
c thread program produces no output kpachopoulos Programming 7 10-14-2005 09:11 PM
execve alwayse produces EFAULT MD3 Programming 3 06-15-2005 01:04 PM
APSfilter produces black images maenho Linux - Software 0 06-01-2005 03:35 AM
make produces errors glevine Programming 1 05-08-2005 07:33 PM
lirc's mode2 produces no output under Mandrake 10 foxostro Linux - Software 0 10-12-2004 08:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration