Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running Mac OS X 10.7.3 (Lion)

I have a problem in using the fortran compiler g77: any program I try to compile, it gives me this message: "g77: installation problem, cannot exec `as"

I've downloaded and installed the latest release of Xcode, but nothing changed...

Thanks in advance for any help,


share|improve this question
Where did you get g77 from as it is not prt of Xcode 4 – Mark Apr 12 '12 at 11:50
From – mcastel Apr 13 '12 at 13:25
Have you downloaded the Xcode command line tools? – Mark Apr 13 '12 at 14:28

g77 is not part of Xcode. You may have a look here which provides a version compatible with Lion and XCode 4.x.

On LION, with XCode 4.3 you will need to download the command-line tools as an additional step. You will find the option to download the command-line tools in XCode 4.3's Preferences

share|improve this answer

I think finding g77 will be a challenge, you are more likely to find gfortran (the HPC link you have been given provides gfrotran).

Aside from HPC, you can get gfortran for Lion from the GCC wiki, which provides a binary for OSX at:

or from the R project:

(I use the R project one, and you need to create the symlink

lrwxr-xr-x  1 root  wheel  21 12 Apr 14:50 /usr/bin/gfortran@ -> /usr/bin/gfortran-4.2

and it works fine, at least to compile Julia).

More on the matter is here:

share|improve this answer
gfortran is the replacement of g77. – patrix Jun 24 '12 at 14:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.