Installing g77 Fortran

Discussion in 'Mac Programming' started by DaveDub, Aug 22, 2006.

  1. macrumors newbie

    Aug 22, 2006
    Can anybody walk me through how to install g77 fortran?

    I think gcc is installed (the terminal recognises the gcc command). I downloaded the tar file for g77 and extracted it and now I have some folders /usr/local/loads of stuff. I have no idea what to do with them now... (why can't it be like the good old days where you just threw stuff in the Extensions or Control Panels folders...)

    I'm using it as part of a theoretical modelling assignment at uni - I'd like to learn Fortran as most physics stuff is still written in it... old school, but it's still good :)
  2. macrumors 68030


    Jul 23, 2004
    Melbourne, Australia
    The GNU Fortran Compiler is available via Fink, so get Fink up and running and it would be as easy as

    sudo apt-get install g77


    sudo fink install g77

    from the terminal, apt-get install would install the binary, fink install would compile it from source.

    Fink -
    Fink GNU Fortran Compiler package -

    I'm sure it is available via DarwinPorts too.

    As for your comment about the good old days, welcome to UNIX. ;)
  3. thread starter macrumors newbie

    Aug 22, 2006
    Awesome! That seems to have worked... I don't think I'll ever get used to installing things through command line though...

    Thanks for your help :)
  4. macrumors regular


    Mar 27, 2006
  5. macrumors newbie

    Jan 24, 2009
    I am also trying to install Fortran 77 compiler. I have 10.4 intel Mac. I installed fink then fort77 but when I run
    #fort77 test.f

    Can't exec "cc": No such file or directory at /sw/bin/fort77 line 392.
    /sw/bin/fort77: aborting compilation

    when I try to install g77 it gives:
    #sudo fink install g77
    could not determine XFree86 version number
    Information about 1731 packages read in 0 seconds.
    Failed: no package found for specification 'g77'!

    Please help me. I need f77 up and running

    Thanks, Jyoti.
  6. macrumors newbie

    May 21, 2009
    Need to enable unstable trees

    I'm relatively new to all this, but according to this discussion, it's because you need to first enable unstable trees.

    I'm in the midst of trying to use fink to install g77 on a intel-based 10.4, so I'll return later and let you know if I was eventually successfuly.

    UPDATE - no such luck, but it may be due to novice status.
  7. macrumors G4

    Jan 5, 2006
    Redondo Beach, California
    Why can't it be like the "old days"? Because The "new" Mac OS X is even older. It's a 40 year old OS, UNIX. It dates from 1969.

    If you have "stuff" in /usr/local/* then you are likely done. That is a good place for a compiler. Try running it. At the command line type "/usr/local/bin/g77 -V" ad you should get a line of text printed with f77's version number.

    If you place "/usr/local/bin" in the PATH environment variable than you will not have to always type "/usr/local/bin"
  8. trn
    macrumors newbie

    Oct 8, 2009
    Help appreciated


    I have an Intel Mac and I am also having problems. Grateful for advice on what to do.


Share This Page