Results 1 to 7 of 7
I have a problem when I want to run executable program,I get this:
./xtramp: error while loading shared libraries: libf2c.so.2: cannot open shared object file: No such file or directory
...
- 06-14-2010 #1Just Joined!
- Join Date
- May 2010
- Posts
- 41
fortran 77 libraries!
I have a problem when I want to run executable program,I get this:
./xtramp: error while loading shared libraries: libf2c.so.2: cannot open shared object file: No such file or directory
My machine is x86_64,may be ere is problem.Anu ideas how to solve this?
- 06-14-2010 #2Just Joined!
- Join Date
- Jan 2009
- Posts
- 8
What distro are you using? The error you are receiving indicates that the file mentioned (libf2c.so.2) either doesn't exist or is named something that the program isn't expecting.
Here's where I would start with troubleshooting:
1) Run "updatedb" as root, then "locate libf2c". If you get results back from this, but the file is named slightly different, then go to step 2a. If not, go to step 2b.
2a) Create a symbolic link to that file with the name the program expects. Example: cd /whatever/directory/thisfile/livesin/ ; ln -s libf2c.so.2 libf2c.so.4 (assuming the file is currently named "libf2c.so.4").
NOTE: It's possible I have teh file names backwards in the ln example... I always forget which one is named first. It should be obvious if you screw it up.
2b) If you get nothing back from the locate command, then the lib is likely to be missing completely. Acquiring the lib will vary depending on your distro. In Fedora (and also probably Red Hat and CentOS) there appears to be a package called "compat-libf2c-34" that might do the trick. This is the standard repos, so a simple "yum install compat-libf2c-34" should get it.
Feel free to reply with your results and I can add more tips to help you get this resolved.
- Swill
- 06-15-2010 #3Just Joined!
- Join Date
- May 2010
- Posts
- 41
Swills thanks a lot!!!!!
But i still have problems:
milenko@hp6830s:~$ locate libf2c
/home/milenko/Desktop/libf2c-3.4.6-11.x86_64.rpm
/home/milenko/Desktop/libf2c2-dev_20050501-2_amd64.deb
/usr/lib/libf2c.a
/usr/lib/libf2c.so
/usr/lib/libf2c.so.2
/usr/lib/libf2c.so.2.1
/usr/lib/libf2c_i2.a
/usr/lib/libf2c_i2.so
/usr/lib/libf2c_i2.so.2
/usr/lib/libf2c_i2.so.2.1
/usr/share/doc/libf2c2
/usr/share/doc/libf2c2-dev
/usr/share/doc/libf2c2/README.debian.gz
/usr/share/doc/libf2c2/README.gz
/usr/share/doc/libf2c2/changelog.Debian.gz
/usr/share/doc/libf2c2/changelog.gz
/usr/share/doc/libf2c2/copyright
/usr/share/doc/libf2c2-dev/README.debian.gz
/usr/share/doc/libf2c2-dev/README.gz
/usr/share/doc/libf2c2-dev/changelog.Debian.gz
/usr/share/doc/libf2c2-dev/changelog.gz
/usr/share/doc/libf2c2-dev/copyright
/var/lib/dpkg/info/libf2c2-dev.list
/var/lib/dpkg/info/libf2c2-dev.md5sums
/var/lib/dpkg/info/libf2c2.list
/var/lib/dpkg/info/libf2c2.md5sums
/var/lib/dpkg/info/libf2c2.postinst
/var/lib/dpkg/info/libf2c2.postrm
/var/lib/dpkg/info/libf2c2.postrm
/var/lib/dpkg/info/libf2c2.shlibs
milenko@hp6830s:~$ cd /usr/local/bin
milenko@hp6830s:/usr/local/bin$ ln -s libf2c.so.2
milenko@hp6830s:/usr/local/bin$ ./xtramp
./xtramp: error while loading shared libraries libf2c.so.2: cannot open shared object file: No such file or directory
- 06-15-2010 #4Just Joined!
- Join Date
- Jan 2009
- Posts
- 8
Ok, great, so it looks like it's a Debian based system, which is a pretty standard base. This entery here: /usr/lib/libf2c.so.2 should actually be all you need. The /usr/lib directory should be in your PATH by default, but you might want to confirm. A couple of things to check:
1) "echo $PATH" and make sure that /usr/lib comes up in the list of directories.
2) Just to be extra sure, cd /usr/lib and do "ls -l libf2c.so.2" and confirm that it's there and whether or not it's a hard file or a soft link. If it's a link, then it *might* be broken or pointing to something that doesn't exist.
Let me know what you get back from those two things and I'll gladly assist with any further troubleshooting.
- Swill
- 06-15-2010 #5Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
I think you only have the 32-bit libraries installed. The 64-bit ones should be in /usr/lib64, not in /usr/lib. I see you have downloaded the 64-bit debian package. You need to install that with apt-get or install the 64-bit version from the repositories using Synaptic or apt-get.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-16-2010 #6Just Joined!
- Join Date
- May 2010
- Posts
- 41
I am on Ubuntu,is debian package all right foor me ot not?
milenko@hp6830s:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
milenko@hp6830s:/usr/lib$ ls -l libf2c.so.2
lrwxrwxrwx 1 root root 13 2010-04-02 15:22 libf2c.so.2 -> libf2c.so.2.1
- 06-16-2010 #7Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
Ubuntu is a debian decendent. It (the .deb file) should install just fine.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote