2

I set up yum from dvd. Following is the containts of my .repo file:

[dvd]
name=Red Hat Enterprise Linux Installation DVD
baseurl=file:///media/dvd
enabled=0.

I'm able to search packages. However while installation I'm getting below error:

[root@localhost dvd]# yum install libstdc++.x86_64
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Nothing to do

My Yum Search output:

[root@localhost dvd]# yum search gcc
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
============================================================================= Matched: gcc =============================================================================
compat-libgcc-296.i386 : Compatibility 2.96-RH libgcc library
compat-libstdc++-296.i386 : Compatibility 2.96-RH standard C++ libraries
compat-libstdc++-33.i386 : Compatibility standard C++ libraries
compat-libstdc++-33.x86_64 : Compatibility standard C++ libraries
cpp.x86_64 : The C Preprocessor.
libgcc.i386 : GCC version 4.1 shared support library
libgcc.x86_64 : GCC version 4.1 shared support library
libgcj.i386 : Java runtime library for gcc
libgcj.x86_64 : Java runtime library for gcc
libstdc++.i386 : GNU Standard C++ Library
libstdc++.x86_64 : GNU Standard C++ Library
libtermcap.i386 : A basic system library for accessing the termcap database.
libtermcap.x86_64 : A basic system library for accessing the termcap database.

Please guide me on this, I want to install gcc on my RHEL.

Jay
  • 6,544
  • 25
  • 34
Mandar Pande
  • 123
  • 1
  • 7

2 Answers2

3

Try changing enabled=0 to enabled=1.

Set enable=0 in a definition file to prevent yum from using that repository. The yum utility ignores any definition file with this setting.


When you enabled the repo you got the following error message

file:///media/dvd/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/media/dvd/repodata/repomd.xml' Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: dvd. Please verify its path and try again

Which suggests that your dvd isn't mounted or if it is mounted, then it is mounted somewhere other than /media/dvd

user9517
  • 115,471
  • 20
  • 215
  • 297
  • With `enabled=1`, I even not able to search the packages also. I'm getting below error: `[root@localhost dvd]# yum install libstdc++.x86_64 Loaded plugins: rhnplugin, security This system is not registered with RHN. RHN support will be disabled. file:///media/dvd/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/media/dvd/repodata/repomd.xml' Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: dvd. Please verify its path and try again ` – Mandar Pande Sep 30 '12 at 09:26
  • 1
    @mandy You didn't mount the DVD at `/media/dvd` so `yum` couldn't find it. Try again. – Michael Hampton Sep 30 '12 at 12:44
  • Now, It shows following informtion/error: `[root@localhost media]# yum install cpp.x86_64 Loaded plugins: rhnplugin, security This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Nothing to do ` – Mandar Pande Sep 30 '12 at 16:12
1

You can solve this problem in one of two ways. Choose one:

  1. Pay for your Red Hat subscription and register the machine on Red Hat Network.
  2. Use a RHEL clone such as CentOS.
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972