Getting G95 Fortran to Work on my Linux VM … a Kludge

Following getting it to work on Windows, I wanted to install G95 as well as GFortran to test some code. I’m using a Linux 32-bit Virtual Machine as detailed here. I don’t know why but following the instructions did not work for me. This is what I did, using the 32-bit x86 binary on a VirtualBox VM:

Opened a terminal then typed all this at the command line (errors edited out):

mkdir installs
cd installs
tar x -vzf g95-x86-linux.tgz
cd g95-install/
ln -s bin/i686-pc-linux-gnu-g95 ~/bin/g95 DID NOT WORK
rm ~/bin/g95
ln /home/username/installs/g95-install/bin/i686-pc-linux-gnu-g95 /home/username/bin/g95
export PATH

Then I could compile. I had to add the big ‘/home/username/installs/g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3‘ entry to both PATH and LIBRARY_PATH for it to work. I don’t think I should have to, but I did have to.

Note that /home/username/bin is also in the PATH.



Tags: , , , ,

About Darren

I'm a scientist by training, based in Australia.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: