LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 08-15-2005, 04:43 PM   #1
musicmaniac414
LQ Newbie
 
Registered: Aug 2005
Posts: 4

Rep: Reputation: 0
can't install g++ so I can't compile and install any programs


I'm trying to install Python 2.4.1 on Fedora 4 linux. I downloaded and unzipped the files. I then tried to ./configure, but there was a problem with the gcc. I configured the gcc, but now when I type ./configure, I get this message

[benjamin@dhcppc0 Python-2.4.1]$ ./configure
checking MACHDEP... linux2
checking EXTRAPLATDIR...
checking for --without-gcc... no
checking for --with-cxx=<compiler>... no
checking for c++... no
checking for g++... no
checking for gcc... gcc
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.

It appears my problem is I don't have c++ or g++. Is that my only issue? If so, how do I install these two compilers? Any help is appreciated, as I'm new to this.
 
Old 08-15-2005, 05:23 PM   #2
joelkeeble
Member
 
Registered: Mar 2005
Posts: 50

Rep: Reputation: 15
print the output of config.log lst 10 lines should be fine.
 
Old 08-15-2005, 05:34 PM   #3
musicmaniac414
LQ Newbie
 
Registered: Aug 2005
Posts: 4

Original Poster
Rep: Reputation: 0
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by python configure 2.4, which was
generated by GNU Autoconf 2.59. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = dhcppc0
uname -m = i686
uname -r = 2.6.11-1.1369_FC4
uname -s = Linux
uname -v = #1 Thu Jun 2 22:55:56 EDT 2005

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/kerberos/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/X11R6/bin
PATH: /home/benjamin/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1444: checking MACHDEP
configure:1578: result: linux2
configure:1584: checking EXTRAPLATDIR
configure:1599: result:
configure:1618: checking for --without-gcc
configure:1667: result: no
configure:1673: checking for --with-cxx=<compiler>
configure:1694: result: no
configure:1713: checking for c++
configure:1742: result: no
configure:1713: checking for g++
configure:1742: result: no
configure:1713: checking for gcc
configure:1729: found /usr/bin/gcc
configure:1739: result: gcc
configure:1779: checking for C++ compiler default output file name
configure:1782: gcc conftest.cc >&5
gcc: installation problem, cannot exec 'cc1plus': No such file or directory
configure:1785: $? = 1
configure: failed program was:

If you need more I can email it to you. Thanks for your help!
 
Old 08-15-2005, 05:48 PM   #4
joelkeeble
Member
 
Registered: Mar 2005
Posts: 50

Rep: Reputation: 15
do a:

"which gcc"

if it returns a path then check that the path is in your path:

"echo $PATH"

if not add it

"PATH=$PATH:/usr/bin/gcc"
Try running ./configure again

if which doesnt return anyting do a find to check it is on the system
"find / -name gcc"

might take a while if it returns nothing then you need to install it, howerver it is unlikley that you dont have gcc every distro iv'e used comes with it, unless you built your own and in that case you would have struggled to compile progs.

if you do find it add a soft link to /usr/bin

"ln -s /wherever/it/is/gcc /usr/bin/gcc"

The run configure agian. if your still having probs let me know
 
1 members found this post helpful.
Old 08-15-2005, 09:01 PM   #5
musicmaniac414
LQ Newbie
 
Registered: Aug 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Okay, here's what happened. gcc wasn't in my path. I added it, but ./configure still won't run. Look at this:

[benjamin@dhcppc0 Python-2.4.1]$ which gcc
/usr/bin/gcc
[benjamin@dhcppc0 Python-2.4.1]$ ./configure
checking MACHDEP... linux2
checking EXTRAPLATDIR...
checking for --without-gcc... no
checking for --with-cxx=<compiler>... no
checking for c++... no
checking for g++... no
checking for gcc... gcc
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.

Here's the latest log

configure:1444: checking MACHDEP
configure:1578: result: linux2
configure:1584: checking EXTRAPLATDIR
configure:1599: result:
configure:1618: checking for --without-gcc
configure:1667: result: no
configure:1673: checking for --with-cxx=<compiler>
configure:1694: result: no
configure:1713: checking for c++
configure:1742: result: no
configure:1713: checking for g++
configure:1742: result: no
configure:1713: checking for gcc
configure:1729: found /usr/bin/gcc
configure:1739: result: gcc
configure:1779: checking for C++ compiler default output file name
configure:1782: gcc conftest.cc >&5
gcc: installation problem, cannot exec 'cc1plus': Not a directory
configure:1785: $? = 1
configure: failed program was:
 
Old 08-17-2005, 03:22 PM   #6
musicmaniac414
LQ Newbie
 
Registered: Aug 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Fixed it. Just logged in as root and typed

#yum install gcc-c++

Thanks for all the help!
 
Old 08-18-2005, 03:13 AM   #7
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
How about just using the FC4 python packages?
 
Old 09-18-2005, 01:10 PM   #8
Ardor
LQ Newbie
 
Registered: Sep 2005
Distribution: RedHat 9.0
Posts: 8

Rep: Reputation: 0
I have the same problem, but with RedHat 9.0
the error message is the same as well
the "yum install" code does not work
 
Old 09-18-2005, 01:51 PM   #9
joelkeeble
Member
 
Registered: Mar 2005
Posts: 50

Rep: Reputation: 15
What happens when you type "gcc" in the terminal?
 
Old 09-18-2005, 11:54 PM   #10
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally posted by Ardor
I have the same problem, but with RedHat 9.0
the error message is the same as well
the "yum install" code does not work
Red Hat 9 doesn't come with yum, that's why you can't use it. You should have the packages you need available on your CDs. I know there's a thing in RH9 similar to Windows' Add/Remove Programs. It has different categories, like "Development tools", "Server", etc. If you can find it (I can't remember where it is, just have a look around the menus you have), look under "Development tools" and it should let you install gcc and other packages from your CDs there.
 
Old 02-06-2008, 05:38 PM   #11
gutsy
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Rep: Reputation: 0
Question g++ help

Hi,
I have a similar problem. I can't install, by manual, programs with the
command "./configure". My System is Ubuntu 7.10 Gutsy Gibbon.


xxx@xxx-desktop:~/Spiele/OTTD-source-nightly-r11814$ ./configure
checking awk... awk
checking build system type... i486-linux-gnu
checking host system type... i486-linux-gnu
detecting OS... UNIX
checking universal build... no
checking build cc... gcc
checking host cc... gcc
checking build c++... g++ not found
I couldn't detect any g++ binary on your system
please define the CC/CXX environment to where it is located
xxx@xxx-desktop:~/Spiele/OTTD-source-nightly-r11814$


I tryied to install g++, but I can't:

It want even more packages. The last is libc6-dev
but this needs libc6 (= 2.6.1-1ubuntu9).

My system wants to install 2.6.1-1ubuntu10.
So I can't install it.

Has anyone an idee what's going on???
 
Old 02-06-2008, 06:16 PM   #12
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
Quote:
Originally Posted by Ardor View Post
I have the same problem, but with RedHat 9.0
the error message is the same as well
the "yum install" code does not work
Red Hat 9 is unsupported as of 2004, unless you have some special reason why you must use RH 9, you should either go to CentOS(free version of Red Hat Enterprise Linux), RHEL(Enterpise version of what is now Fedora), or Fedora which is another free Red Hat based distro
 
Old 02-06-2008, 09:31 PM   #13
JivanAmara
LQ Newbie
 
Registered: Nov 2007
Posts: 15

Rep: Reputation: 1
Re: configure fails to find g++.

Quote:
Originally Posted by gutsy View Post
Hi,
I have a similar problem. I can't install, by manual, programs with the
command "./configure". My System is Ubuntu 7.10 Gutsy Gibbon.
[snip]
I couldn't detect any g++ binary on your system
please define the CC/CXX environment to where it is located
[snip]
Have you read/followed post #4 above?
 
  


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
what compile programs to install? provkitir Debian 7 12-29-2004 09:33 AM
How do I install programs? SonoranFun Linux - Software 7 11-11-2004 01:16 PM
where to install programs to CrotchCricket Linux - Newbie 2 10-26-2004 06:42 AM
Install programs in RH 7.3 Thinkgeekness Linux - General 21 12-17-2002 12:50 PM
Install Programs stewe151 Linux - Software 7 07-16-2002 08:41 AM


All times are GMT -5. The time now is 02:58 PM.

Main Menu
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