LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Terminal "man" Problem (https://www.linuxquestions.org/questions/linux-general-1/terminal-man-problem-79786/)

inTUXicated 08-07-2003 05:03 AM

Terminal "man" Problem
 
i can't seem to get any help from my linux machine...
when i try

man tar

I get

sh: line 1: /usr/bin/gunzip: No such file or directory
fgets: No such file or directory
Error reading man page /usr/share/man/man1/tar.1.gz
No manual entry for tar

or

man rpm

I get

sh: line 1: /usr/bin/gunzip: No such file or directory
fgets: No such file or directory
Error reading man page /usr/share/man/man8/rpm.8.gz
No manual entry for rpm

I upgraded my kernel to 2.4.20-19.9..before everything was ok I can get a positive output from the "man" command.

fatgod 08-07-2003 06:11 AM

look like you need to install gzip.

inTUXicated 08-07-2003 06:35 AM

I tried to check if I already have gzip installed by entering "locate" and it said that it is located in my /bin/ directory.
also i checked for /usr/share/man/man8/rpm.8.gz for the manual entry for rpm and guess what i do have them.
it just bug the hell out of me why it doesn't return any manual when i enter

man rpm

fatgod 08-07-2003 07:27 AM

'man' cant find gunzip where it expects it to be. Just do this as root...

ln -s /usr/bin/gunzip /bin/

and give it a go. This just creates a file called gunzip in /bin/ that points to
/usr/bin/gunzip

'ls -l /bin/gunzip' will show you what I'm taking about after it's done.

BTW this is called a symbolic link.

inTUXicated 08-07-2003 11:50 AM

ok here's what happened

'ln -s /usr/bin/gunzip /bin/'

ln: `/bin//gunzip': File exists

'ls -l /bin/gunzip'

-rwxr-xr-x 3 root root 53716 Feb 1 2003 /bin/gunzip

but when i

'man rpm'

i get

sh: line 1: /usr/bin/gunzip: No such file or directory
fgets: No such file or directory
Error reading man page /usr/share/man/man8/rpm.8.gz
No manual entry for rpm

stefanlasiewski 08-07-2003 12:13 PM

I think fatgod got the commands backwards. Happens all the time with 'ln'.

Do this instead:

ln -s /bin/gunzip /usr/bin/gunzip

To keep things consistant, you should also do this, if /bin/gzip exists and /usr/bin/gunzip does not:

ln -s /bin/gzip /usr/bin/gzip

-= Stefan

inTUXicated 08-07-2003 12:23 PM

so far heres the situation:
ln -s /bin/gunzip /usr/bin/gunzip

ln: `/usr/bin/gunzip': File exists

ln -s /bin/gzip /usr/bin/gzip

ln: `/usr/bin/gzip': File exists

man rpm
sh: line 1: /usr/bin/gunzip: No such file or directory
fgets: No such file or directory
Error reading man page /usr/share/man/man8/rpm.8.gz
No manual entry for rpm

stefanlasiewski 08-07-2003 12:32 PM

Hmmm.... bet one of our previous commands created some bad links.

Do this, so we can see where the links are pointing too, and what the original files look like:

ls -ld /bin/gunzip /usr/bin/gunzip /bin/gzip /usr/bin/gzip

-= Stefan

stefanlasiewski 08-07-2003 12:46 PM

Another thought:

Is this a RedHat 9 system? If so, then it's a little worrysome that your gzip & gunzip aren't available in /usr/bin. Looks like some files were removed from you system. Do you know why?

Your gzip & gunzip utilities should be located in the following locations by default:

% ls -l /usr/bin/gzip /usr/bin/gunzip
lrwxrwxrwx 1 root root 16 Apr 16 11:22 /usr/bin/gunzip -> ../../bin/gunzip
lrwxrwxrwx 1 root root 14 Apr 16 11:22 /usr/bin/gzip -> ../../bin/gzip
% ls -l /bin/gzip /bin/gunzip
-rwxr-xr-x 3 root root 53716 Jan 31 2003 /bin/gunzip
-rwxr-xr-x 3 root root 53716 Jan 31 2003 /bin/gzip


Why on earth are you missing the symlinks?

-= Stefan

inTUXicated 08-07-2003 01:22 PM

I am using RHL 9 and just upgraded my kernel..after upgrading this thing just happened.

ls -ld /bin/gunzip /usr/bin/gunzip /bin/gzip /usr/bin/gzip

-rwxr-xr-x 3 root root 53716 Feb 1 2003 /bin/gunzip
-rwxr-xr-x 3 root root 53716 Feb 1 2003 /bin/gzip
lrwxrwxrwx 1 root root 16 Jul 26 11:35 /usr/bin/gunzip -> ../../bin/gunz)p
lrwxrwxrwx 1 root root 14 Jul 26 11:35 /usr/bin/gzip -> ../../bin/gzip

ls -l /usr/bin/gzip /usr/bin/gunzip

lrwxrwxrwx 1 root root 16 Jul 26 11:35 /usr/bin/gunzip -> ../../bin/gunz)p
lrwxrwxrwx 1 root root 14 Jul 26 11:35 /usr/bin/gzip -> ../../bin/gzip

ls -l /bin/gzip /bin/gunzip

-rwxr-xr-x 3 root root 53716 Feb 1 2003 /bin/gunzip
-rwxr-xr-x 3 root root 53716 Feb 1 2003 /bin/gzip

stefanlasiewski 08-07-2003 01:30 PM

<i>lrwxrwxrwx 1 root root 16 Jul 26 11:35 /usr/bin/gunzip -> ../../bin/gunz<b>)</b>p</i>

Is that a typo? (Might be an issue with character encoding in my browser, so I'm not sure).

Does thtat really say 'gunz)p' with a parenthesis instead if an 'i' in the word gunzip?

If so, that's the problem! :)

-= Stefan

inTUXicated 08-07-2003 01:38 PM

hey you're right man, it is!! can we fix it??
gunz)p instead of gunzip

inTUXicated 08-07-2003 01:42 PM

i navigated to my /bin folder but it seems fine it's there gunzip the way it should be spelled
but when i enter

ls -l /usr/bin/gzip /usr/bin/gunzip

I still get

that gunz)p thing

stefanlasiewski 08-07-2003 03:28 PM

I think you need to remove the link first, and then symlink it.

So:

rm /usr/bin/gunzip
ln -s /bin/gunzip /usr/bin/gunzip

Then doublecheck to make sure that things are pointing to the correct place:

ls -l /usr/bin/gunzip /bin/gunzip

fatgod 08-07-2003 06:14 PM

Swish stefanlasiewski ;)


All times are GMT -5. The time now is 04:40 PM.