2

I'm having trouble installing it. I have followed the steps on the link below but when I try to run g95 on terminal it says it doesn't exist.

how to install g95 in ubuntu 12.04

this is what it looks like on terminal:

marvin@marvin-MacBookPro:~$ tar -zxvf g95-x86-linux.tgzg95-install/
g95-install/INSTALL
g95-install/G95Manual.pdf
g95-install/bin/
g95-install/bin/i686-pc-linux-gnu-g95
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/f951
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/cc1
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/crtbegin.o
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/crtbeginS.o
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/crtbeginT.o
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/crtend.o
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/crtendS.o
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/libgcc.a
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/libgcc_eh.a
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/libgcc_s.so
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/libgcc_s.so.1
g95-install/lib/gcc-lib/i686-pc-linux-gnu/4.0.3/libf95.a

marvin@marvin-MacBookPro:~$ sudo ln -s ~/g95-install/bin/i686-pc-linux-gnu-g95  /bin/g95
[sudo] password for marvin: 
ln: failed to create symbolic link `/bin/g95': File exists
marvin@marvin-MacBookPro:~$ echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
marvin@marvin-MacBookPro:~$ g95 --version
bash: /bin/g95: No such file or directory
mdizzle
  • 41

2 Answers2

2

I found the problem. I was trying to run a 32-bit binary on a 64-bit system that doesn't have 32-bit support installed. This was why the output was "No such file or directory" each time i tried to run it. To fix this, I installed 32 bit libraries with this command

sudo apt-get install ia32-libs

after that I followed the steps of installing g95 from the beginning and worked perfectly fine

to determine problem: No such file or directory? But the file exists!

Running 32bit apps in 64 bit linux: http://www.maketecheasier.com/run-32-bit-apps-in-64-bit-linux/2009/08/10

mdizzle
  • 41
0

First delete /bin/g95 with this command: sudo rm /bin/g95. After try again from (inclusive):

sudo ln -s ~/g95-install/bin/i686-pc-linux-gnu-g95  /bin/g95
Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407