LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   installation problem, cannot exec `cc1': No such file or directory (https://www.linuxquestions.org/questions/linux-newbie-8/installation-problem-cannot-exec-%60cc1-no-such-file-or-directory-877570/)

newypei 04-28-2011 04:58 AM

installation problem, cannot exec `cc1': No such file or directory
 
Hello everyone,I am new here.and I got some trouble with gcc of my linux system.I have learnt linux for about one week,so I can hardly understand the answers which I got from google.yesterday,I just installed my gcc to my redhat linux,however,when I run my first simple c program,I encounter a error
"installation problem, cannot exec `cc1': No such file or directory".I don't know how to solve it,so i come here for help.

I installed my gcc with 13 rpm files:
----------------------------------------
compat-gcc-32-3.2.3-47.3.i386.rpm
compat-gcc-32-c++-3.2.3-47.3.i386.rpm
cpp-3.4.6-3.i386.rpm
gcc-3.4.6-3.i386.rpm
gcc-c++-3.4.6-3.i386.rpm
gcc-g77-3.4.6-3.i386.rpm
gcc-gnat-3.4.6-3.i386.rpm
gcc-java-3.4.6-3.i386.rpm
gcc-objc-3.4.6-3.i386.rpm
glibc-devel-2.3.4-2.25.i386.rpm
glibc-headers-2.3.4-2.25.i386.rpm
glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
libgcc-3.4.6-3.i386.rpm
-------------------------------------------
Duaring the process of installing I haven't seen any error.


by the way,i am not from a English-speaking country,so there may exists some mistakes in spelling and using phrase even grammar.I would like to apologize for that,sorry.

yancek 04-28-2011 10:01 PM

If it's a short/simple script, your best bet might be to just post the contents of the script here.

knudfl 04-28-2011 10:18 PM

Welcome to LQ.

'cc1' should be in place with 'gcc-c++-3.4.6-3' installed.
( Like /usr/libexec/gcc/i386-redhat-linux/3.4.6/cc1 ).

Some rare programs could tease gcc not to find its own cc1.
( cc1plus has the same location, and may also not be found.)
I have seen that once or twice. Long time ago.
A link can do the trick :
# ln -s /usr/libexec/gcc/i386-redhat-linux/3.4.6/cc1 /usr/local/bin/

If you are not using gcc-3.2.3, you can leave the link. Else : delete it,
when you have finished with the program.


P.S. : Your old EL 4.2 has not been updated since 2005.
glibc-kernheaders-2.4-9.1.98.EL.i386.rpm is from that time.

newypei 06-01-2011 08:24 PM

Thank you,I have solved this problem.I reinstalled my linux system,and I choose to install these program-developing tools which were prompted.Thanks for your answers.


All times are GMT -5. The time now is 05:41 PM.