Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old April 9th, 2006   #1
derjames
Way Too Much Ubuntu
 
derjames's Avatar
 
Join Date: Mar 2006
Location: Sheffield, UK
Beans: 322
Post HowTo install g95 fortran compiler

Hello there,
I was looking for info about g95 fortran compiler in Ubuntu, however I found nothing, you can install very quickly g77 using the instruction from the following wiki

https://wiki.ubuntu.com/InstallingCo...%28compiler%29

however some people do prefer g95 and this is not included in the synaptic list, so if you plan to use it for whatever reason use the following instructions:

1. enter to g95 project page

http://g95.sourceforge.net/

2. download the binary (g95-x86-linux.tgz for the x86 platform In my caseor download the right binary for your system)

3. create a new directory which will hold the uncompressed file, in my case is (for example)

/etc/g95

use sudo if necessary

4. copy the downloaded file to this new location
5. untar the file using

Code:
tar -xzvf g95-x86-linux.tgz
6. The executable is located in

/etc/g95/g95-install/bin/i686-pc-linux-gnu-g95

7. Since this directory is not included in the PATH environment variables a link to this file have to be generated, there are to ways to do this (1) to use 'export' that location to the PATH using export or (2) create a symbolic link, the latter will be used.

8. A symbiolic link is a reference to an existing file from a new created file, you have to use the command 'ln'

the syntax is as follows

Code:
ln -s ExistingFileName NewLinkName
where -s indicates that a symbolic link will be created between the to files

for my case this would be

Code:
ln -s /etc/g95/g95-install/bin/i686-pc-linux-gnu-g95 /bin/g95
you can see that the new link is the file g95 located at /bin so when you call the compiler, the computer will look first at /bin then will locate g95 but g95 is just a link to the real executable file which is located at

/etc/g95/g95-install/bin/i686-pc-linux-gnu-g95

Why do we do this?, because /bin is already located in the PATH environment variables. Type

Code:
echo $PATH
to confirm this

After this you will be able to run g95, use

Code:
g95 --help
for more info

Cheers
derjames is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:12 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry