how to install gcc 4.2.1?

Asked by koosha hosseiny

i want to install gcc 4.2.1
but after configuring the gcc, when i type make after a long time,at the end i get these:

make[3]: *** [java/parse-scan.o] Error 1
make[3]: Leaving directory `/Fall/gcc/gcc/host-i686-pc-linux-gnu/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/Fall/gcc/gcc'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/Fall/gcc/gcc'
make: *** [all] Error 2

and after typing make install, this happens:

koosha@Koosha:/Fall/gcc/gcc$ make install
make[1]: Entering directory `/Fall/gcc/gcc'
/bin/sh ./mkinstalldirs /usr/local /usr/local
cd: 5: can't cd to host-i686-pc-linux-gnu/fixincludes
make[1]: *** [install-fixincludes] Error 2
make[1]: Leaving directory `/Fall/gcc/gcc'
make: *** [install] Error 2

why?what i have to do to install gcc correctly?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu build-essential Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cesare Montedonico (cmontedonico) said :
#1

Maybe this its not the answer, but works.

Type this on a therminal

$ sudo apt-get install gcc
this install gcc compiler

and after
$ sudo apt-get install build-essential
this install the libraries

Revision history for this message
joelgat (carguy) said :
#2

Hello,

To the Original Poster, 'sudo make install' would have done the trick, if you wanted to install the latest and greatest (ie, not the repository version). Cesare's version installs the repository version, which at the time of my response is 0.0.1 behind.

Joel

Revision history for this message
pasan (pasanindeewara) said :
#3

sudo apt-get install build-essential works fine - Pasan Indeewara

Can you help with this problem?

Provide an answer of your own, or ask koosha hosseiny for more information if necessary.

To post a message you must log in.