LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   commands not found (https://www.linuxquestions.org/questions/linux-newbie-8/commands-not-found-4175478133/)

thiyagusham 09-22-2013 08:17 PM

commands not found
 
Hello Everyone ;

Basic commands not working why ?

redhat 5.1 fresh installation.

PHP Code:

# cd /mnt/hgfs/
[root@oracle hgfs]# ls -l
total 0
drwxrwxrwx 1 root root 0 Sep 23 04
:44 oracle

[root@oracle hgfs]# cd oracle/
[root@oracle oracle]# ls -l
total 340748
-rwxrwxrwx 1 root root 668734007 Oct  4  2008 10.2.0.1_database_software_linux32.zip

[root@oracle oracle]# unzip 10.2.0.1_database_software_linux32.zip 
bashunzipcommand not found 

PHP Code:

[oracle@oracle oracle]$ export PATH=$PATH:/bin:/usr/local/bin
[oracle@oracle oracle]$ echo $path
...... no output .............
[
oracle@oracle oracle]$ 

thnaks ..

frankbell 09-22-2013 08:42 PM

What is the output of

Code:

whereis unzip
As for path, I think that "PATH" is case sensitive. Try

Code:

echo $PATH

thiyagusham 09-22-2013 08:44 PM

Hello frankbell

PHP Code:

which bash
/bin/bash
[oracle@oracle ~]$ whereis unzip
unzip
:
[
oracle@oracle ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/bin:/usr/local/bin 


frankbell 09-22-2013 09:25 PM

No program named unzip appears to be installed. (Whereis is a great utility. It looks only for executable programs and ignores libraries, configuration files, and all the other stuff that will turn up when you use locate.)

This link might help. It informs me that unzip is often not included in Linux distros and suggests ways to get it. You may also be able to decompress zipped files using Gnome's file roller or KDE's Ark, if you have either of those programs installed.

Unzip is something I haven't had occasion to use for a long time.

knudfl 09-22-2013 10:02 PM

Quote:

redhat 5.1 fresh installation.
I guess you mean Redhat EL 5.1 ? Redhat 5.1 is a 1998 release :
http://en.wikipedia.org/wiki/Red_Hat_Linux

Still too old : Current is RHEL 5.9 ! http://distrowatch.com/?newsid=04579
Update 5.9 http://distrowatch.com/?newsid=07657


$ which unzip
/usr/bin/unzip/
.. That's a new install of the free Redhat EL5 version : CentOS 5.9 .

`unzip' is not a Linux / Unix command and may not be installed
by default, RHEL 5.1 . But it's easy to get : # yum install unzip

-

thiyagusham 09-23-2013 12:59 AM

@ knudfl

Thanks for your reply. but still NOT workable. Can you provide any other way to do ??

PHP Code:

# yum install unzip
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
Parsing package install arguments
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
No Match 
for argumentunzip
Nothing to 
do

[
root@oracle ~]# whereis unzip
unzip:

# cd /mnt/hgfs/oracle
# ls -l
total 340748
-rwxrwxrwx 1 root root 668734007 Oct  4  2008 10.2.0.1_database_software_linux32.zip
[root@oracle oracle]# unzip 10.2.0.1_database_software_linux32.zip 
bashunzipcommand not found 

PHP Code:

# which unzip
/usr/bin/whichno unzip in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin


jdkaye 09-23-2013 01:32 AM

I don't know anything about RHEL. I thought you paid for support if you use it. Anyway, Debian certainly has an unzip package. You might find more information here.
Here's the Debian description of the package:
Quote:

:~$ aptitude show unzip
Package: unzip
State: installed
Automatically installed: yes
Multi-Arch: foreign
Version: 6.0-9
Priority: optional
Section: utils
Maintainer: Santiago Vila <sanvila@debian.org>
Architecture: amd64
Uncompressed Size: 386 k
Depends: libbz2-1.0, libc6 (>= 2.4)
Suggests: zip
Conflicts: unzip-crypt (< 5.41), unzip-crypt (< 5.41), unzip
Replaces: unzip-crypt (< 5.41), unzip-crypt (< 5.41)
Provides: unzip
Provided by: unzip
Description: De-archiver for .zip files
InfoZIP's unzip program. With the exception of multi-volume archives (ie, .ZIP files that are split across
several disks using PKZIP's /& option), this can handle any file produced either by PKZIP, or the
corresponding InfoZIP zip program.
jdk

knudfl 09-23-2013 02:39 AM

# 6 .
Quote:

Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
No Repositories Available to Set Up
When you have "No Repositories Available", no packages can be installed.
Except those you have in your own local repository : $ yum list all

Choices for a solution : Activate the "Redhat license / subscription".
Or migrate the OS to CentOS 6 . EDIT : CentOS 5.
http://wiki.centos.org/HowTos/MigrationGuide

Or use a CentOS 6 package : EDIT → See post #10.
Which you can do for a package with "no dependencies" : unzip-6.0-1.el6.<arch>.rpm
http://mirror.centos.org/centos/6.4/os/
→ # yum localinstall unzip-6.0-1.el6.<arch>.rpm

-

thiyagusham 09-23-2013 04:22 AM

2 Attachment(s)
hello knudfl

please see the screen shot.

i cannot see any items under # cd /media/

[root@oracle ~]# cd /media/
[root@oracle media]# ls -l
total 0

knudfl 09-23-2013 05:47 AM

Ref. post # 8.

Sorry, the unzip package : Should be an el5 package :
unzip-5.52-3.el5.<arch>.rpm
http://mirror.centos.org/centos/5.9/os/


Post # 9 : Don't know why you are listing /media/ ?
( The list 01.png shows a few of the installed packages.)

-

jpollard 09-23-2013 08:29 AM

Try "gunzip". This is a GNU reimplementation (hence the different name), but provides the same functionality.

ruario 09-23-2013 12:41 PM

Quote:

Originally Posted by jpollard (Post 5033142)
Try "gunzip". This is a GNU reimplementation (hence the different name), but provides the same functionality.

No gzip/gunzip does NOT provide the same functionality as zip/unzip! They work with completely different formats by default (gz compressed files versus zip compressed archives) and they use different switches. All these utils share share is the fact that they use Deflate compression by default and all utilities were born out of the Info-ZIP project.

EDIT: GNU's gunzip does have an extra feature that means it can extract files created by zip but only if they have a single member compressed with the 'deflation' method. The file the OP mentions is clearly an archive with multiple files, so this will fail.

ruario 09-23-2013 01:18 PM

If you have problems with RHEL you should really contact RedHat.

However, assuming you really are running RedHat 5.1 (32-bit), this should work. Issue the following as root:

Code:

rpm -ivh http://mirror.centos.org/centos/5.9/os/i386/CentOS/unzip-5.52-3.el5.i386.rpm

frankbell 09-23-2013 08:43 PM

Whoops, I didn't read ruario's post thoroughly, but I'm leaving this here as the command shown below might help.

Try

Code:

yum provides unzip
If I recall correctly that should tell you what package(s) would include unzip. Unfortunately, I do not have a RHEL or CentOS installation on which I can test the command.

This page for the CentOS docs will tell you more.

http://www.centos.org/docs/5/html/yu...-packages.html

Remember that RHEL is not designed for desktop use--it designed for use in the Enterprise as a server OS. It may not provide the same functionality in all cases as a distro designed for desktop use.

ruario 09-24-2013 06:24 AM

I presume this is also the OP https://forums.oracle.com/thread/2584692


All times are GMT -5. The time now is 09:48 PM.