1

I have one server with Red Hat Enterprise Linux AS release 4 (Nahant Update 3) installed. And I tried to add the online repo using this link:

Centos Wiki: RPMForge

And everything goes smooth. But when I tried to install any package it replies:

[root@Backup yum.repos.d]# yum -v install httpd
-bash: yum: command not found

There are some repos in /etc/yum.repo.d/:

mirrors-rpmforge  mirrors-rpmforge-extras  mirrors-rpmforge-testing  rpmforge.repo

The content of rpmforge.repo is:

[root@Backup yum.repos.d]# cat rpmforge.repo
### Name: RPMforge RPM Repository for RHEL 4 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el4/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el4/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el4/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el4/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el4/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el4/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

Command Results

[root@Backup yum.repos.d]# yum
-bash: yum: command not found
[root@Backup yum.repos.d]# which yum
/usr/bin/which: no yum in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)
[root@Backup yum.repos.d]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
[root@Backup yum.repos.d]# rpm -q yum
package yum is not installed
[root@Backup yum.repos.d]# find /bin/ /usr/bin -name yum
[root@Backup yum.repos.d]# find /bin/ /usr/bin -name yum*
[root@Backup yum.repos.d]# ls -l /etc/yum.comf
ls: /etc/yum.comf: No such file or directory
[root@Backup yum.repos.d]# ls -l /etc/yum.conf
ls: /etc/yum.conf: No such file or directory
  • Can you give the exact terminal output? – NotFromBrooklyn May 20 '13 at 7:37
  • I added the information in Question Section – OmiPenguin May 20 '13 at 7:43
  • could you please provide output of following commands: type yum ; which yum ; echo $PATH ; rpm -q yum ; find /bin /usr/bin -name yum – rush May 20 '13 at 8:13
  • I have added the info in Question under Command Results. Seems like yum is not installed – OmiPenguin May 20 '13 at 8:19
  • 2
    So you have to install it, and everything will be fine :) – rush May 20 '13 at 8:29
5

After simple checks I've asked you in answer comment:

[root@Backup yum.repos.d]# yum
-bash: yum: command not found
[root@Backup yum.repos.d]# which yum
/usr/bin/which: no yum in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)
[root@Backup yum.repos.d]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
[root@Backup yum.repos.d]# rpm -q yum
package yum is not installed

we can verify that you don't have yum installed in your system.

Please install it via rpm and you'll be able to launch it.

2
  1. Go to pkgs.org.
  2. Find the yum rpm package for your rhel version and architecture (x86 or x86_64).
  3. Download the rpm package.
  4. Install with su -c 'rpm -i ~/Downloads/*.rpm or with your graphical package manager.
0

They yum package is not installed by default in RHEL4, because it appeared later. You can installed it or use up2date command to install software.

  • Thanks for the information. So this is the reason. I never used rhel4 before so i had no idea about it. I started to learn from rhel5 – OmiPenguin May 20 '13 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.