LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 07-04-2013, 03:03 PM   #1
jfernandez1977
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Rep: Reputation: 0
configure: error: C++ compiler missing or inoperational while trying to make gcc


I've downloaded the gcc-4.8.1.tar.gz and tried to install it on redhat linux

I ran
./configure
make

during make, it complained
configure: error: C++ compiler missing or inoperational

I'm install c++ compiler and it complains about c++ compiler is missing. what should I do? thanks for any advice.

yum never worked on this machine because it's in a lab and needs through a proxy. I haven't figured out how to make yum work on proxy.
 
Old 07-04-2013, 03:08 PM   #2
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,143

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
Quote:
Originally Posted by jfernandez1977 View Post
I've downloaded the gcc-4.8.1.tar.gz and tried to install it on redhat linux
You need to install some pre built compiler before installing gcc from that kind of archive.

You probably should install some pre built gcc instead of installing gcc from that kind of archive.

If you have a licensed (paid for) redhat, you should be able to install software from the redhat repositories.

If you don't have a paid for license, or you have some restricted license that doesn't include access to gcc binaries (I don't actually know what restricted licenses exist). This situation is a good example of why you shouldn't be using Red Hat at all when you don't want to pay for what you want to use.

Quote:
Originally Posted by jfernandez1977 View Post
yum never worked on this machine because it's in a lab and needs through a proxy. I haven't figured out how to make yum work on proxy.
If this were some free distribution in the Red Hat family (Centos etc.) then the answer to that issue is pretty clear. You can download the required packages using a web browser or using a different computer or in a variety of different ways that don't need yum. Then you can install the packages locally bypassing yum.

There is a little extra effort required to figure out exactly which packages you need and the steps required to get and install those packages. But overall, it still makes a lot more sense than trying to install from source code.

I don't know how all that is changed by having a paid licensed copy of Red Hat. Obviously the paid license makes such things harder (one of my personal objections to paid licenses), but in theory the paid license also gives you access to support personnel who can give you the answer. I think it also gives you access to custom online documentation which covers common situations (lack of direct net access for yum must be common enough to be documented).

Last edited by johnsfine; 07-04-2013 at 03:18 PM.
 
Old 07-04-2013, 04:13 PM   #3
jfernandez1977
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Original Poster
Rep: Reputation: 0
thanks johnsfine.

I tried to download packages using other machines and try to compile, but when I tried to make gcc, it complained c++ compiler is missing.
 
Old 07-04-2013, 04:25 PM   #4
John VV
Guru
 
Registered: Aug 2005
Posts: 13,531

Rep: Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807
on this rhel machine ( guessing it is the current RHEL 6.4 )
Code:
su -
--- your root password when asked for ---
yum groupinstall "Development Tools"
mind you you MUST have a paid for license to install software on red hat

if you did not buy the required license , please do so now !
-- the server license
https://www.redhat.com/wapps/store/catalog.html
-- single desktop install
https://www.redhat.com/apps/store/desktop/
( and if you have to ask " what one" then likely you will need the
"Standard Subscription (1 year)" license

if you do not intend on buying the required license , then do not use RHEL !!!
instead install the FREE rebuild of red hat
CentOS 6.4
http://centos.org/

also gcc 4.8 is SO NEW that there is a LOT of programs that WILL NOT BUILD USING IT -- YET
without hacking the program to build using the rather NEW gcc 4.8
also seeing as red hat used gcc 4.3 or 4.4 to build rhel6.4
you eill need the version of gcc that built the kernel to build any kernel related software ( like the NVIDIA.run driver)
the nvidia driver will not build on rhel6 using gcc 4.8

Last edited by John VV; 07-04-2013 at 04:29 PM.
 
Old 07-04-2013, 04:34 PM   #5
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,143

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
Quote:
Originally Posted by jfernandez1977 View Post
I tried to download packages using other machines and try to compile, but when I tried to make gcc, it complained c++ compiler is missing.
By "packages" I meant .rpm files and I meant the .rpm file including the gcc c++ compiler, plus all the other rpm files that one depends on.

Then, if it were Fedora, you could use the rpm command to install those. In the Red Hat you have, I don't know whether such things are that similar to Fedora.

You should stop trying to install ANYTHING from source code until you have successfully installed a compiler (from a .rpm file)

Even before looking for the right .rpm files, check the man page on the rpm command, to make sure you have it and to find out the basics of how to use it.

It is possible you have or can setup a "local repository" (such as an install DVD) for yum and can configure yum to use only the local repository, not any online repository. You can find instructions online. That is all beyond my own abilities to figure out without a lot of "try and see" and at the moment I don't have admin rights on any system using yum. But maybe you can find online instructions clearer than the ones I found with a minimal google search.

AFTER you have installed (from .rpm file) a gcc version that is supported in your version of redhat, you may want to give more thought to why you want a newer version than that. gcc is designed such that a careful sysadmin can make multiple versions of gcc independently available on the same system. Toward that end, you could use the supported version installed from the .rpm file to install the newer version from source from the .gz file. Then you would have both.
But since you aren't expert enough to already know everything I just explained, I have to doubt that you are expert enough to make effective use of a gcc version that is different from the one officially supported by your version of redhat. Why do you want that specific gcc version?

Last edited by johnsfine; 07-04-2013 at 04:48 PM.
 
Old 07-05-2013, 09:36 AM   #6
jfernandez1977
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Hi, John,

I was trying to install modsecurity for apache. I downloaded the source and tried to compile. It requires pcre. I download pcre and it needs C++ compiler. so I donwloaded the latest version of gcc. that's how I got the problem.

I also downloaded the rpm (gcc-c++-4.4.7-3.el6.x86_64.rpm)
rpm -Uvh gcc-c++-4.4.7-3.el6.x86_64.rpm

but got the following errors

warning: gcc-c++-4.4.7-3.el6.x86_64.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID c105b9de
error: Failed dependencies:
gcc = 4.4.7-3.el6 is needed by gcc-c++-4.4.7-3.el6.x86_64
libc.so.6(GLIBC_2.11)(64bit) is needed by gcc-c++-4.4.7-3.el6.x86_64
libc.so.6(GLIBC_2.7)(64bit) is needed by gcc-c++-4.4.7-3.el6.x86_64
libgmp.so.3()(64bit) is needed by gcc-c++-4.4.7-3.el6.x86_64
libmpfr.so.1()(64bit) is needed by gcc-c++-4.4.7-3.el6.x86_64
libstdc++ = 4.4.7-3.el6 is needed by gcc-c++-4.4.7-3.el6.x86_64
libstdc++-devel = 4.4.7-3.el6 is needed by gcc-c++-4.4.7-3.el6.x86_64
rpmlib(FileDigests) <= 4.6.0-1 is needed by gcc-c++-4.4.7-3.el6.x86_64
rpmlib(PayloadIsXz) <= 5.2-1 is needed by gcc-c++-4.4.7-3.el6.x86_64
 
Old 07-05-2013, 10:42 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,286

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Quote:
libc.so.6(GLIBC_2.11)(64bit) is needed by gcc-c++-4.4.7-3.el6.x86_64
libc.so.6(GLIBC_2.7)(64bit) is needed by gcc-c++-4.4.7-3.el6.x86_64
libc.so.6(GLIBC_2.7)(64bit) is needed by gcc-c++-4.4.7-3.el6.x86_64
.
rpmlib(PayloadIsXz) <= 5.2-1 is needed by gcc-c++-4.4.7-3.el6.x86_64
May be you have an older version = RHEL 5.x ?

? What's the output from $ cat /etc/redhat-release <Enter>
? And $ uname -m <Enter>

-
 
Old 07-05-2013, 10:58 AM   #8
jfernandez1977
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Original Poster
Rep: Reputation: 0
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
# uname -m
x86_64

Last edited by jfernandez1977; 07-05-2013 at 11:00 AM.
 
Old 07-05-2013, 12:03 PM   #9
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,143

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
Quote:
Originally Posted by jfernandez1977 View Post
I also downloaded the rpm (gcc-c++-4.4.7-3.el6.x86_64.rpm)
From where?

I think you need a version of the gcc .rpm that was built for your version of RHEL.

I think the point of knudfl's post was that the gcc .rpm you downloaded needed some RHEL 6 version.

You may also need some additional .rpm files that the gcc .rpm depends on. Using .rpm files directly means you need to figure out the dependencies. The error messages for missing dependencies would look very similar to the messages you posted that are instead due to trying to install a gcc that needs a newer RHEL.

So once you get the right .rpm for gcc, the error messages may not go away completely.

Last edited by johnsfine; 07-05-2013 at 12:08 PM.
 
Old 07-05-2013, 01:27 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,286

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
RHEL 5.4 packages http://ftp.scientificlinux.org/linux.../54/x86_64/SL/

You will need (at least) these packages : x86_64 :
gcc-4.1.2
gcc-c++-4.1.2
glibc-devel
glibc-headers
kernel-headers

-
 
Old 07-05-2013, 02:04 PM   #11
jfernandez1977
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Original Poster
Rep: Reputation: 0
thanks very much for 2 of you. a coworker of mine gave me a mod_security2.so so I can load with apache. I will try to install those packages later.
 
Old 07-05-2013, 02:11 PM   #12
John VV
Guru
 
Registered: Aug 2005
Posts: 13,531

Rep: Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807
Quote:
rpm -Uvh gcc-c++-4.4.7-3.el6.x86_64.rpm
PLEASE USE YUM

you must have installed a version of gcc that the OS WAS BUILT WITH !!!!! ( for some things to build)
-- yes you can install a second version og gcc "side-by-side" but the default version in the rhn repo MUST be installed---
that version is IN the software repos and is the default installed version

and use the "groupinstall" to install all the MISSING required programs that are NEEDED
and THEY ALSO MUST MATCH
the versions MUST be compatible

so use YUM
to install then
it makes sure that the versions are compatible

do NOT use "rpm" to install rpms from random locations from the web !!!!!!
that is the FASTEST way to 100 " "Bleep"-up " your install

as stated before !!!!
Code:
su -
--- your root password when asked for ---
yum groupinstall "Development Tools"
that will install the RHEL gcc and ALL of the needed tools that gcc NEEDS
and the versions will be compatible

Last edited by John VV; 07-05-2013 at 02:12 PM.
 
Old 07-05-2013, 03:05 PM   #13
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,143

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
Quote:
Originally Posted by John VV View Post
PLEASE USE YUM
The main issue in this thread is that the RHEL system in question has web access "through a proxy" and the OP can't figure out how to use yum under those conditions.

Feel free to explain how to use yum to access a remote repository despite the proxy. I didn't know how, so I suggested an alternative that you don't approve of.

Feel free to explain how to get the right contents into a "local repository" and to restrict yum to using that repository. I expect that is the better answer, so I mentioned it earlier. But I don't know myself how to do it, so I didn't give useful instructions.
 
  


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
[SOLVED] GCC-4.6.2 configure: error: C compiler cannot create executables Andy45 Linux From Scratch 2 03-25-2012 07:34 PM
checking for C compiler default output... configure: error: C compiler cannot create clubbing80s Linux - Software 3 07-05-2010 09:17 PM
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 01:35 PM
Problem with gcc: configure: error: C compiler cannot create executable abefroman Suse/Novell 4 05-11-2005 07:12 PM
GCC 3.4.1 configure script needs CC compiler? battousai9439 Linux - Software 11 12-24-2004 02:33 PM


All times are GMT -5. The time now is 09:46 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration