LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-06-2014, 12:06 PM   #1
neil117
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Rep: Reputation: Disabled
install gcc 4.7 on Red Hat 6.4


hi,
i'v been trying to install gcc 4.7 on Red Hat 6.4 with yum\rpm etc.
but it keeps giving me errors,and all kind of messages that the repositories not valid\404 ...
what is the right way to do it?
please help me.....

thank you very much.
 
Old 11-06-2014, 12:08 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Can you provide the command and the output?
 
Old 11-06-2014, 12:25 PM   #3
neil117
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
[me@localhost ~]$ wget http://people.centos.org/tru/devtool...tools-1.1.repo
--2014-11-06 09:24:18-- http://people.centos.org/tru/devtool...tools-1.1.repo
Resolving people.centos.org... 204.15.73.242
Connecting to people.centos.org|204.15.73.242|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 174 [text/plain]
Saving to: “devtools-1.1.repo”

100%[======================================>] 174 --.-K/s in 0s

2014-11-06 09:24:19 (22.4 MB/s) - “devtools-1.1.repo” saved [174/174]

[me@localhost ~]$ rpm --import http://www.scientificlinux.org/docum...M-GPG-KEY-cern
curl: (22) The requested URL returned error: 404 Not Found
error: http://www.scientificlinux.org/docum...-GPG-KEY-cern: import read failed(2).
[tal@localhost ~]$ wget ftp://mirror.switch.ch/pool/4/mirror...el6.x86_64.rpm
--2014-11-06 09:24:43-- ftp://mirror.switch.ch/pool/4/mirror...el6.x86_64.rpm
=> “devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64.rpm”
Resolving mirror.switch.ch... 130.59.10.36, 2001:620:0:8::20
Connecting to mirror.switch.ch|130.59.10.36|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pool/4/mirror/scientificlinux/6x/external_products/devtoolset/x86_64/1.1 ... done.
==> SIZE devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64.rpm ... 6425252
==> PASV ... done. ==> RETR devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64.rpm ... done.
Length: 6425252 (6.1M) (unauthoritative)

100%[======================================>] 6,425,252 468K/s in 16s

2014-11-06 09:25:00 (401 KB/s) - “devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64.rpm” saved [6425252]

[me@localhost ~]$ wget ftp://mirror.switch.ch/pool/4/mirror...el6.noarch.rpm
--2014-11-06 09:25:03-- ftp://mirror.switch.ch/pool/4/mirror...el6.noarch.rpm
=> “devtoolset-1.1-runtime-1-13.el6.noarch.rpm”
Resolving mirror.switch.ch... 130.59.10.36, 2001:620:0:8::20
Connecting to mirror.switch.ch|130.59.10.36|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pool/4/mirror/scientificlinux/6x/external_products/devtoolset/i386/1.1 ... done.
==> SIZE devtoolset-1.1-runtime-1-13.el6.noarch.rpm ... 1097036
==> PASV ... done. ==> RETR devtoolset-1.1-runtime-1-13.el6.noarch.rpm ... done.
Length: 1097036 (1.0M) (unauthoritative)

100%[======================================>] 1,097,036 413K/s in 2.6s

2014-11-06 09:25:07 (413 KB/s) - “devtoolset-1.1-runtime-1-13.el6.noarch.rpm” saved [1097036]

[me@localhost ~]$ rpm -ivh devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64.rpm
warning: devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
error: Failed dependencies:
devtoolset-1.1-gcc = 4.7.2-5.el6 is needed by devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64
devtoolset-1.1-libstdc++-devel = 4.7.2-5.el6 is needed by devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64
 
Old 11-06-2014, 05:19 PM   #4
neil117
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
cross-arm-gcc = 2010.09-2 is needed by cross-arm-glibc-2010.09-2.x86_64
 
Old 11-06-2014, 05:21 PM   #5
neil117
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
sudo wget ftp://rpmfind.net/linux/Mandriva/off...1.0.x86_64.rpm


warning: devtoolset-1.1-gcc-4.7.2-5.el6.i686.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
error: Failed dependencies:
devtoolset-1.1-runtime is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libc.so.6 is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libc.so.6(GLIBC_2.0) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libc.so.6(GLIBC_2.1) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libc.so.6(GLIBC_2.1.3) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libc.so.6(GLIBC_2.11) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libc.so.6(GLIBC_2.2) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libc.so.6(GLIBC_2.3) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libc.so.6(GLIBC_2.3.4) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libc.so.6(GLIBC_2.4) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libc.so.6(GLIBC_2.7) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libdl.so.2 is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libdl.so.2(GLIBC_2.0) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libdl.so.2(GLIBC_2.1) is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libgmp.so.3 is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libmpfr.so.1 is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
libz.so.1 is needed by devtoolset-1.1-gcc-4.7.2-5.el6.i686
 
Old 11-06-2014, 05:22 PM   #6
neil117
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
iam not an expert in linux as you can see
if someone can explain me the whole process that i need to do it will be great
thanks again
 
Old 11-06-2014, 06:52 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,647

Rep: Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655
well FIRST off
Mandriva
is not redhat
it is not compatible
and you are trying to install a glib for a ARM cup and for a different OS

think of it as trying to install apple MAC "system files"
on windows 8
-- will not work

RHEL6 is a commercial product .
One that you NEED to BUY $$$ the REQUIRED support contract


please post the full output of this
Code:
su -
yum repolist all
including any errors
 
Old 11-07-2014, 05:04 AM   #8
neil117
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
hi,
thank you very much for your help
i know that REDHAT cost $$ but for now i need it as a test machine for the production env.


[root@localhost ~]# yum repolist all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id repo name status
rhel-source Red Hat Enterprise Linux 6Server - x86_64 - Source disabled
rhel-source-beta Red Hat Enterprise Linux 6Server Beta - x86_64 - Source disabled
repolist: 0
 
Old 11-07-2014, 05:16 AM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,647

Rep: Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655
here is your problem
Quote:
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
register it with redhat

that really is the only way to install gcc 4.7

PS
gcc 4.4.7 should be the default and already installed
do you just need gcc
or
MUST IT BE 4.7

4.4 is the DEFAULT compiler

if all you need is a compiler
then the normal command will WORK once you register the install
Code:
su -
yum groupinstall " Development Tools"
and gcc and EVERYTHING it needs will be installed
there are a LOT of other programs that gcc NEEDS

Last edited by John VV; 11-07-2014 at 05:19 AM.
 
Old 11-07-2014, 06:53 AM   #10
neil117
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
our client said he wants only 4.7 gcc and nothing else.
maybe ill try to install it on centos?
want is the the right way to do this on cent os?
 
Old 11-07-2014, 08:14 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #10 .

Simple :

If you have a 64bits OS, el6, change line 3 in
/etc/yum.repos.d/devtools-1.1.repo to :
baseurl=http://people.centos.org/tru/devtools-1.1/6/x86_64/RPMS/

Install gcc-4.7.2 :
Code:
# yum install devtoolset-1.1-gcc-c++

Installed:
  devtoolset-1.1-gcc-c++.x86_64 0:4.7.2-5.el6                                   
Dependency Installed:
  devtoolset-1.1-gcc.x86_64 0:4.7.2-5.el6                                       
  devtoolset-1.1-libstdc++-devel.x86_64 0:4.7.2-5.el6                           
  devtoolset-1.1-runtime.noarch 0:1-13.el6
$ cd /usr/bin/
# ln -s /opt/centos/devtoolset-1.1/root/usr/bin/g++ g++47
# ln -s /opt/centos/devtoolset-1.1/root/usr/bin/gcc gcc47

Then you have /usr/bin/{ gcc47, g++47 }.
Test compilation : $ export CC=gcc47 CXX=g++47 && <other-command>.
* No issues with a complicated piece of software :
Hundreds of files c and c++ code were built OK with gcc47, g++47.

-

Last edited by knudfl; 11-07-2014 at 08:16 AM.
 
Old 11-08-2014, 01:42 PM   #12
neil117
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
i dont have this path:
"/etc/yum.repos.d/devtools-1.1.repo"

this is the out put from my machine:

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686 i686 i386 GNU/Linux
[root@localhost ~]# cat /etc/yum.repos.d/CentOS-
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
[root@localhost ~]# cat /etc/yum.repos.d/CentOS-


[root@localhost ~]# yum install devtoolset-1.1-gcc-c++
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirror.nonstop.co.il
* extras: mirror.nonstop.co.il
* updates: mirror.nonstop.co.il
base | 3.7 kB 00:00
extras | 3.3 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 162 kB 00:00
Setting up Install Process
No package devtoolset-1.1-gcc-c++ available.
Error: Nothing to do
[root@localhost ~]# gcc -v
-bash: gcc: command not found
 
Old 11-08-2014, 01:59 PM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #12 .
Quote:
I dont have this path:
"/etc/yum.repos.d/devtools-1.1.repo"
I guess you mean that you don't have the file ?

Please read post #3 by @neil117 :
The first link is the file "/etc/yum.repos.d/devtools-1.1.repo"
http://people.centos.org/tru/devtool...tools-1.1.repo


-
 
Old 11-08-2014, 05:30 PM   #14
neil117
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
hi,
i did what toy said but it still says i have gcc 4.4.7:
ot@localhost ~]# vim /etc/yum.repos.d/devtools-1.1.repo
[root@localhost ~]# cd /usr/bin/
[root@localhost bin]# ln -s /opt/centos/devtoolset-1.1/root/usr/bin/g++ g++47
[root@localhost bin]# ln -s /opt/centos/devtoolset-1.1/root/usr/bin/gcc gcc47
[root@localhost bin]# export CC=gcc47 CXX=g++47
[root@localhost bin]# gcc -v
Using built-in specs.
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
 
Old 11-08-2014, 06:12 PM   #15
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,647

Rep: Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655Reputation: 2655
Quote:
/opt/centos/devtoolset-1.1/root/usr/bin/
????
WHY

Why did you put it there ??????
install it as NORMAL for RHEL into /usr
 
  


Reply

Tags
devtoolset, gcc47-centos6


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
how to install GCC in Red Hat Enterprise? newbie2011 Red Hat 9 07-05-2011 01:45 AM
HowTo Install GCC on Red Hat Enterprise 3 ? skate Red Hat 4 02-27-2006 11:11 PM
install new gcc v3.4.5 over gcc v3.2.2 on red hat 9 mlaich Linux - Newbie 2 01-01-2006 09:52 PM
How to install GNU g++ and gcc compilers on Red Hat 9.0? naveenkoneru Linux - Newbie 1 07-20-2004 07:11 AM
How do i install gcc on red hat 9 NRHBasher Linux - Newbie 5 03-11-2004 10:35 PM

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

All times are GMT -5. The time now is 06:29 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