user972276
user972276

Reputation: 3053

gcc: error trying to exec 'as': execvp: No such file or directory

I was trying to install gcc and gfortran on my intel mac with mountain lion and keep getting the above error when trying to compile the fortran file. gcc doesn't seem to work either with c programs. This is the error I get with my c program:

test.c:1:19: fatal error: stdio.h: No such file or directory

I tried typing this into terminal:

export PATH=${PATH}:/usr/local/bin

but that did not work. I added gcc and gfortran to /usr/local/bin instead of /usr/bin. I downloaded the compilers through hpc. The files had the given directory structure:

/usr/local/bin: contained gcc and gfortran along with other compilers
/uer/local/include/...
/usr/local/lib/...
etc...

I pretty much just copied and pasted all the files directly over to the exact same path directories on my computer and ran the export command. That is all I have done.

Upvotes: 1

Views: 6350

Answers (1)

rubenvb
rubenvb

Reputation: 76805

You probably need either odcctools (as provided by macports) or XCode (which contains the Mac "binutils", and the Clang compiler, GCC was discontinued).

Upvotes: 2

Related Questions