LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-28-2009, 07:38 AM   #1
uks
Member
 
Registered: Jul 2007
Posts: 72

Rep: Reputation: 16
installing rpm pacakges


I am trying to install a python package and it needs gcc.
I try to install all the packages of gcc including the compat-gcc pacakges but the depth goes on since each package requires one library or another...
i tried rpm -ivh compat* or gcc* it needs a lot of dependecies.
Is there any easy way to do this ? Is there any easy way to point and install all packages needed without having to speify everything ? I am installing from the cent os cd.
this is centos 52

Thanks in advance.


Also I notice that many pacakges are installed twice, like for example:

rpm -qa | grep gcc
libgcc-4.1.2-42.el5
libgcc-4.1.2-42.el5

How can I remove just one of them.

Rgds

Last edited by uks; 02-28-2009 at 07:39 AM.
 
Old 02-28-2009, 07:48 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by uks View Post
Is there any easy way to do this ? Is there any easy way to point and install all packages needed without having to speify everything ? I am installing from the cent os cd.
Yes. Use yum instead of the rpm command. Yum takes care of dependencies automatically. If the system is connected to internet, yum will look for packages on some online repository. If you want to use your own installation DVD as a repository, most likely you have to enable it and disable the online ones.
Quote:
Originally Posted by uks View Post
rpm -qa | grep gcc
libgcc-4.1.2-42.el5
libgcc-4.1.2-42.el5
This is a common situation in 64-bit systems. Is this an x86_64 system architecture? Indeed you cannot have two packages with the same name installed at the same time, unless one is 32-bit and the other 64-bit. To see the difference, use the command
Code:
rpm -q libgcc --qf "%{name}-%{version}-%{release} %{arch}\n"
 
Old 02-28-2009, 11:07 AM   #3
uks
Member
 
Registered: Jul 2007
Posts: 72

Original Poster
Rep: Reputation: 16
Unfortunately I cannot connect to the net with this machine.
The only way i can install is thru the cd....
Any ideas ? can i make yum point to the dvd ?

Yes, these are from 2 different architechtures.
thanks for that. the command revaled it.
Is there any way I can remove ond of these ?

thanks in advance.
 
Old 02-28-2009, 11:21 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
I have not my Centos machine at hand now, but you should have a file called /etc/yum.repos.d/CentOS-Media.repo or something similar. If you edit it change (or add the line) with the option enabled to
Code:
enabled=1
If you do not want to edit yum repository configuration files, you can enable the DVD repository directly from the command line:
Code:
yum --disablerepo=\* --enablerepo=c5-media  name-of-the-package-to-install
this will disable the currently enabled repositories (the ones online) and enabled the media DVD repo.
 
Old 02-28-2009, 11:40 AM   #5
uks
Member
 
Registered: Jul 2007
Posts: 72

Original Poster
Rep: Reputation: 16
I tried that , nut it does not seem to work.I have pasted the output below.
I have also edited that file to include the path to the mount point of the cd for the c5-media like this:

name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///mnt/
file:///media/cdrecorder/
gpgcheck=1
enabled=1



where /mnt is my mounted path to the cd rom
but does not help:

yum --disablerepo=\* --enablerepo=c5-media gcc-c++
Loading "dellsysidplugin2" plugin
Loading "fastestmirror" plugin
Loading "dellsysidplugin" plugin
Loading mirror speeds from cached hostfile
* c5-media:
usage: yum [options] < grouplist, localinstall, groupinfo, localupdate, resolvedep, erase, deplist, groupremove, makecache, upgrade, provides, shell, install, whatprovides, groupinstall, update, repolist, groupupdate, info, search, check-update, list, remove, clean, grouperase >

Last edited by uks; 02-28-2009 at 11:41 AM.
 
Old 02-28-2009, 11:50 AM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Here is the standard media repo file.

[c5-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


Until you get used to things it is better to stick with the "standard" way of doing things. Once you get used to things you will understand why.
 
Old 02-28-2009, 11:52 AM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Here is the standard media repo file.

[c5-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


Edit: Sorry double post. ISP is acting up again.


Until you get used to things it is better to stick with the "standard" way of doing things. Once you get used to things you will understand why.

Last edited by lazlow; 02-28-2009 at 12:05 PM.
 
Old 02-28-2009, 01:25 PM   #8
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by uks View Post
yum --disablerepo=\* --enablerepo=c5-media gcc-c++
Loading "dellsysidplugin2" plugin
Loading "fastestmirror" plugin
Loading "dellsysidplugin" plugin
Loading mirror speeds from cached hostfile
* c5-media:
usage: yum [options] < grouplist, localinstall, groupinfo, localupdate, resolvedep, erase, deplist, groupremove, makecache, upgrade, provides, shell, install, whatprovides, groupinstall, update, repolist, groupupdate, info, search, check-update, list, remove, clean, grouperase >
Sorry, my fault. I missed the yum command. It should be
Code:
yum --disablerepo=\* --enablerepo=c5-media install gcc-c++
Taking a look at the yum manual page would not hurt, anyway.
 
Old 02-28-2009, 11:24 PM   #9
uks
Member
 
Registered: Jul 2007
Posts: 72

Original Poster
Rep: Reputation: 16
You are being sorry for my stupidity
Forgot the install option, sorry for wasting your time.

Anyway I am in this funny situation now:

I run :
yum --disablerepo=\* --enablerepo=c5-media install gcc

And it gives me a list of processing commands before it gives me the last two lines as:

Error: Missing Dependency: glibc = 2.5-24 is needed by package glibc-devel
Error: Missing Dependency: glibc = 2.5-24 is needed by package glibc-headers


And then I run

[root@host /]# rpm -qa | grep glibc
glibc-common-2.5-24.el5_2.2
glibc-2.5-24.el5_2.2
glibc-2.5-24.el5_2.2

And there are 2 because like we discussed earlier its 2 architecture packages on x64

Please advice!

Rgds
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for particular RPM installed r not before installing other RPM yshashidhar Linux - Newbie 8 10-24-2008 01:06 PM
Install Fedora 8 pacakges for Oracle 11g satbirdhil Linux - Software 1 12-23-2007 03:21 PM
Yast2 and source pacakges delta_9 SUSE / openSUSE 4 11-27-2007 10:35 AM
Installing the nvidia driver off the web site and installing rpm in ubuntu? darkhatter Ubuntu 3 02-19-2006 02:44 PM
installing an RPM trempel Linux - Newbie 6 02-25-2005 02:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration