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 wget http://ftp.g95.org/g95-x86-linux.tgz 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 PATH=/home/username/installs/g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3:$PATH export PATH LIBRARY_PATH=/home/username/installs/g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3 export LIBRARY_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.