I have a 32-bit Fortran application that I need to run on a 64-bit ubuntu server. I have verified the application on a 32-bit ubuntu machine and it runs fine; however, I get the following error when I run in on the 64-bit server:
error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory
Doing some research on this, I've tried the following with no joy:
sudo apt-get install libgfortran3:i386
which can't locate the package ldconfig -v
which finds libgfortran.so.3 -> libgfortran.so.3.0.0
under /usr/lib/x86_64-linux-gnu:
... LD_LIBRARY_PATH
to that, which did nothing (though I have to say that my knowledge gets very sparce once we start talking about library paths...) dpkg --configure --pending
and dpkg --path-include=/usr/lib/x86_64-linux-gnu
. I'd like to stay away from creating a 32-bit chroot if at all possible but at this point I don't if there is anything else to do that could keep me from having to do so...
Do any of you have an idea as to something else I could do? Thank you.
Try to install the package lib32gfortran3
, as that would install the 32 bit version of the libgfortran library. Before starting the program, you may eventually need to set LD_LIBRARY_PATH="/usr/lib32:"
but probably it will run also without this.
I'm not sure if this was an oversight on my part or something else; but here are the two steps that fixed it all:
sudo apt-get install gfortran
on a 64-bit machine which will install the GNU Fortran Compiler The strange part was that at this point I was still not able to just copy/paste the application file to other 64-bit machines and run it. Rather, I first had to separately install gfortran on each machine, even if I wasn't planning on compiling anything. Once gfortran was installed, the application would run, no matter where it was compiled... I presume that the libgfortran3 must have been some dependency...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.