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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-28-2009, 07:38 AM
|
#1
|
Member
Registered: Jul 2007
Posts: 72
Rep:
|
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.
|
|
|
02-28-2009, 07:48 AM
|
#2
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Quote:
Originally Posted by uks
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
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"
|
|
|
02-28-2009, 11:07 AM
|
#3
|
Member
Registered: Jul 2007
Posts: 72
Original Poster
Rep:
|
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.
|
|
|
02-28-2009, 11:21 AM
|
#4
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
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
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.
|
|
|
02-28-2009, 11:40 AM
|
#5
|
Member
Registered: Jul 2007
Posts: 72
Original Poster
Rep:
|
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.
|
|
|
02-28-2009, 11:50 AM
|
#6
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Rep: 
|
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.
|
|
|
02-28-2009, 11:52 AM
|
#7
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Rep: 
|
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.
|
|
|
02-28-2009, 01:25 PM
|
#8
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Quote:
Originally Posted by uks
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.
|
|
|
02-28-2009, 11:24 PM
|
#9
|
Member
Registered: Jul 2007
Posts: 72
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 12:56 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|