Question

I'm trying to run a simple fortran code I wrote following an intro to fortran tutorial using Mac Terminal. When I try to run it I get the library not loaded. When I try to run the library it refers to it says "cannot execute binary file." What can I do to run this command? Thank you

Here is the text from my terminal:

hntvlan569:work Abdullah$ ./fact
dyld: Library not loaded: /usr/local/lib/libgfortran.3.dylib
  Referenced from: /Users/Abdullah/work/./fact
  Reason: image not found
Trace/BPT trap: 5
Was it helpful?

Solution

I wrote the executable on emacs. It appears I hadn't properly installed all the required software before attempting to run it. I found this website useful and after following all the instructions there my problem was solved: https://wiki.helsinki.fi/display/HUGG/Installing+the+GNU+compilers+on+Mac+OS+X

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top