Installing RPMs from your CDROM by adding it to yum.repos
Writing by shivdev on Friday, 10 of February , 2012 at 12:59 am
RHEL can be such a pain! I installed RHEL 6.1 and there was no gcc on there!?! Now for whatever reason I needed it and it wasn’t able to get yum install gcc to work. I’m not surprised at all – RHEL/CentOS are well known for being tortuous!
So now I needed to install the gcc* rpm from the CDROM and again I run into dependency hell. No big deal – it’s a well known RHEL problem.
Fortunately, I found Adding cdrom to yum as repo which partially rescued me. Next, I ran into Public key for kernel-headers-2.6.32-131.0.15.el6.x86_64.rpm is not installed and followed this link to get me going.
Step 1: Mount your CDROM to /mnt/cdrom
$ mount /dev/cdrom /mnt/cdrom (For Example)Step 2: Add the CDROM to your yum.repos (Tell yum to look at the CDROM as well while installing packages)
$ vi /etc/yum.repos.d/file.repoStep 3: Paste the following
[local]
name=Local CD Repo
baseurl=file:///mnt/cdromStep 4: Tell yum to ignore any gpg key checking
$ vi /etc/yum.conf
Change gpgcheck=1 to gpgcheck=0Step 5: Run the yum install and if found on the CDROM it’ll install it for you
$ yum install gcc (in my case)
Leave a comment
Category: Linux,Tips and Tricks
- Add this post to
- Del.icio.us -
- Digg -
- -
- Tweet -
-
-
No comments yet.
You must be logged in to post a comment.