LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2014, 11:55 AM   #1
metal_militia
LQ Newbie
 
Registered: Aug 2014
Posts: 2

Rep: Reputation: Disabled
Question Installing multiple rpm package versions?


Hi everyone,

I'm installing a software that requires gcc-3.4.3, however my RHEL 6.5 system already comes with a newer version which I can neither replace (rpm -Uvh) nor remove (rpm -e) because it is needed by other packages, I'm not sure if uninstalling the newer gcc package and all it's dependencies is the way to go, is there any way to have both versions?

Here is what I've attempted so far:

[root@beat tmp]# rpm -ivh gcc-3.4.3-9.EL4.x86_64.rpm
warning: gcc-3.4.3-9.EL4.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73307de6: NOKEY
error: Failed dependencies:
cpp = 3.4.3-9.EL4 is needed by gcc-3.4.3-9.EL4.x86_64
[root@beat tmp]# rpm -ivh cpp-3.4.3-9.EL4.x86_64.rpm
warning: cpp-3.4.3-9.EL4.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73307de6: NOKEY
Preparing... ########################################### [100%]
package cpp-4.4.7-4.el6.x86_64 (which is newer than cpp-3.4.3-9.EL4.x86_64) is already installed
file /usr/bin/cpp from install of cpp-3.4.3-9.EL4.x86_64 conflicts with file from package cpp-4.4.7-4.el6.x86_64
file /usr/share/info/cpp.info.gz from install of cpp-3.4.3-9.EL4.x86_64 conflicts with file from package cpp-4.4.7-4.el6.x86_64
file /usr/share/info/cppinternals.info.gz from install of cpp-3.4.3-9.EL4.x86_64 conflicts with file from package cpp-4.4.7-4.el6.x86_64
file /usr/share/man/man1/cpp.1.gz from install of cpp-3.4.3-9.EL4.x86_64 conflicts with file from package cpp-4.4.7-4.el6.x86_64
[root@beat tmp]# rpm -Uvh cpp-3.4.3-9.EL4.x86_64.rpm
warning: cpp-3.4.3-9.EL4.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73307de6: NOKEY
error: Failed dependencies:
cpp = 4.4.7-4.el6 is needed by (installed) gcc-4.4.7-4.el6.x86_64
[root@beat tmp]# rpm -Uvh gcc-3.4.3-9.EL4.x86_64.rpm
warning: gcc-3.4.3-9.EL4.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73307de6: NOKEY
error: Failed dependencies:
cpp = 3.4.3-9.EL4 is needed by gcc-3.4.3-9.EL4.x86_64
gcc = 4.4.4 is needed by (installed) libtool-2.2.6-15.5.el6.x86_64
gcc = 4.4.7-4.el6 is needed by (installed) gcc-c++-4.4.7-4.el6.x86_64
gcc = 4.4.7-4.el6 is needed by (installed) gcc-gfortran-4.4.7-4.el6.x86_64
[root@beat tmp]# rpm -Uvh --replacefiles cpp-3.4.3-9.EL4.x86_64.rpm
warning: cpp-3.4.3-9.EL4.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73307de6: NOKEY
error: Failed dependencies:
cpp = 4.4.7-4.el6 is needed by (installed) gcc-4.4.7-4.el6.x86_64
[root@beat tmp]# rpm -e gcc-4.4.7-4.el6.x86_64
error: Failed dependencies:
gcc = 4.4.4 is needed by (installed) libtool-2.2.6-15.5.el6.x86_64
gcc = 4.4.7-4.el6 is needed by (installed) gcc-c++-4.4.7-4.el6.x86_64
gcc is needed by (installed) systemtap-devel-2.3-3.el6.x86_64
gcc = 4.4.7-4.el6 is needed by (installed) gcc-gfortran-4.4.7-4.el6.x86_64

Thanks in advance for any guidance you may be able to provide, cheers!
 
Old 08-14-2014, 01:03 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,667

Rep: Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710
You can't have two versions occupying the same space at the same time. The simplest way to do what you want is to download the source for the old compiler and build it from scratch (using the new compiler, ironically). Here are instructions:

https://gcc.gnu.org/faq.html#multiple

Why does your software need the older version? Have you tried compiling it with the newer version?
 
1 members found this post helpful.
Old 08-14-2014, 01:14 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,877

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
The only way I can think of to have two different versions of gcc is to have one installed via rpm, and the other compiled from source code.

In the first step of the compilation, the ./configure phase, you would need to set some variables so that the rpm version is not overwritten. For example, if the rpm version goes into /usr/bin/, then you would need to set the --prefix location, something like --prefix=/usr/local/bin.

You will not be able to update the compiled version in a simple manner. When updates are released, you will have to either patch and recompile, or download the updated package and compile.

Bear in mind that, in order to use the alternate gcc, you would have to specify it on the command line as /usr/local/bin/gcc, because the default /usr/bin is in your PATH variable, and the shell has no way of knowing which you want to use unless you tell it the full path to the executable.
 
1 members found this post helpful.
Old 08-14-2014, 02:09 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
How about the other default EL6 compiler, i.e. gcc version 3.4.6 ?

# yum install compat-gcc-34-c++
... will provide /usr/bin/{ gcc34, g++34 }.

* Generally : You can have as many version of gcc as you want,
installed at the same.
( EL5 came with /usr/bin/{ gcc(-4.1.2), gcc44(-4.4.7), gcc34 }.)

-
 
Old 08-14-2014, 03:07 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,990

Rep: Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448
on redhat DO NOT use "rpm" to install some random rpm you downloaded from some random site

that is THE FASTEST WAY TO KILL your install !

use the package manager "yum"
as the redhat documentation instructs you to do

there are only very few software packages to be installed by using rpm
libreoffice is one of these exceptions

a compiler IS NOT
it is part of the base operating system

there are MANY different versions in the yum repos
3.4,4.1,4.3,4.7 and so on

as long as the rpm is built to be installed "side by side" and all of them in the repos are
you can install many versions
BUT!!!!!
you NEED!!!!! to configure "alternatives" or use a shell script ( the old way) to set the DEFAULT compiler to use when ( CC,gcc,c++,g++ ) are called .


also
"rpm -ivh gcc-3.4.3-9.EL4.x86_64.rpm "
see that el4 part in the name
that is for RHEL4
a very very very old and unsupported version of of redhat

Last edited by John VV; 08-14-2014 at 03:08 PM.
 
1 members found this post helpful.
Old 08-19-2014, 02:29 PM   #6
metal_militia
LQ Newbie
 
Registered: Aug 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you all for your replies and my apologies for the delay in getting back to you, unfortunately I'm currently dealing with multiple issues, thankfully this this is no longer one of them... regarding the responses:

@smallpond - "Why does your software need the older version? Have you tried compiling it with the newer version?"
The software was very specific about version 3.4.3 being required, hence my focus on obtaining this rpm.

@knudfl - "How about the other default EL6 compiler, i.e. gcc version 3.4.6 ?
# yum install compat-gcc-34-c++ ... will provide /usr/bin/{ gcc34, g++34 }."
I had that package installed but the prerequisite checker still produced an error stating the above mentioned package was not found on the system.

@bigrigdriver - "Bear in mind that, in order to use the alternate gcc, you would have to specify it on the command line as /usr/local/bin/gcc, because the default /usr/bin is in your PATH variable, and the shell has no way of knowing which you want to use unless you tell it the full path to the executable."
I was aware that I would have to specify the alternate path somehow which just contributed to making this whole thing even more confusing, the software I'm using is GUI based so I had no idea how I was going to get it to redirect to using the other version.

@John VV - use the package manager "yum" as the redhat documentation instructs you to do"
Thank you for your advice, I'll stick with using the package manager from now on.

In the end what solved the problem was installing the (newer) 32 bit version along with the 64 bit version of the libgcc rpm on the system, the installation "how-to" I was working with was inaccurate and did not specify both were needed. Thank you all once again for your assistance, though the root cause of this issue was not as I originally thought I'm sure what I learned from your comments will definitely come in handy.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Centos, local yum repo and multiple versions of rpm b0redom Linux - Server 2 11-30-2012 03:04 AM
Installing two versions of one package alexbrui Slackware 11 09-23-2011 02:07 PM
How to install multiple versions of package? terry-duell Fedora 10 10-01-2010 03:53 PM
Locking up: could multiple installed versions of same package be culprit? registering Linux - Software 2 01-17-2007 11:18 AM
Multiple RPM versions installed Tomasfuego Linux - Software 0 05-15-2003 03:28 PM


All times are GMT -5. The time now is 04:44 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration