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
  • 1
  • 5

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
  • 1
  • 5
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
  • 169,590
  • i did that, got the something similar marvin@marvin-MacBookPro:~$ rm /bin/g95 rm: cannot remove `/bin/g95': Permission denied marvin@marvin-MacBookPro:~$ sudo rm /bin/g95 [sudo] password for marvin: marvin@marvin-MacBookPro:~$ sudo ln -s ~/g95-install/bin/i686-pc-linux-gnu-g95 /bin/g95 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 bash: /bin/g95: No such file or directory marvin@marvin-MacBookPro:~$ – mdizzle May 19 '13 at 00:11
  • I followed the suggestion, but was not able to confirm the installation of the compiler – mdizzle May 19 '13 at 00:18
  • Try to run /bin/g95. Or ~/g95-install/bin/i686-pc-linux-gnu-g95. Or /bin/g95 --version. It will be the same result? – Radu Rădeanu May 19 '13 at 00:25
  • yup, they all say "bash (whatever command I ran): No such file or directory" – mdizzle May 19 '13 at 00:51
  • But ~/g95-install/bin/i686-pc-linux-gnu-g95 and /bin/g95 exists? Check with cd (e.g. cd /bin/g95) and, eventualy, with a file manager – Radu Rădeanu May 19 '13 at 00:56
  • marvin@marvin-MacBookPro:~$ cd /bin/g95 bash: cd: /bin/g95: Not a directory ...the sym link exists i think, but for some reason when the program is not installing. does using 'tar' command automatically install the program, or just unpackage? – mdizzle May 19 '13 at 00:57
  • And cd ~/g95-install/bin/i686-pc-linux-gnu-g95 ? – Radu Rădeanu May 19 '13 at 01:00
  • it says it is not a directory--but i'm looking at it right now. to see it i go to home->g95-install->bin – mdizzle May 19 '13 at 01:03
  • All of this looks very strange... Maybe a start from the beginning it will be a good point. Inclusive a fresh download from here... – Radu Rădeanu May 19 '13 at 01:08
  • i used the new download and followed the steps outlined in the other installation post and unfortunately ended in with the same output – mdizzle May 19 '13 at 01:16