Problems with c++ compilers on ubuntu 10.10

Hello,
I am facing the following problems compiling a very simple c++ program on a machine equipped with Ubuntu 10.10 OS:

  • when writing “g++ prog.C -o prog.exe” (or I can also do “g++ -o prog.exe prog.C”) I receive this reply:
    “unable to exec g++.real: No such file or directory”.
    Same thing if I compile using "c++ … ".
  • If I try with "gcc … " it says:
    “cannot exec ‘cc1plus’: No such file or directory”

I then checked in /usr/bin and there a lot of compilers seem to be available:
gcc -> builder-cc
gcc-3.4
gcc-4.4
gcc.real -> gcc-4.4
g++ -> builder-c++
… but I’m always getting the same reply. in particular with gcc-3.4 it says:
“Installation error: cannot exec ‘cc1plus’: No such file or directory”!

I read in other forums that this can be a problem of the 10.10 release (on my personal pc, where I have a 10.04 release, everything goes fine) and that one should try to remove and install again the compiler, but the 10.10 Maverick repositories are expired.

Help, what do you suggest?
Elena

Hi,

this sounds like a misconfiguration of your setup.
Anyway, has this problem anything to do with ROOT?

Cheers,
Danilo

Hi,
well no, this topic is not directly connected to root problems,
but I have some root commands in the program I would like to run…
I thought I could post a question like this in the Non-ROOT Specific General Chat…
I thank you in advance if some suggestions could be nevertheless possible.
Elena

What do you get if you type:

$ which g++

or

$ which gcc

?

Hello,
I get
/usr/bin/gcc
and
/usr/bin/g++
so apparently I should have no problems…
Could it be that some library or stuff like that is missing?
Should I perhaps uninstall the compilers and install again some essential package?
From which repositories?
Sorry…
Elena