error while loading shared libraries



error while loading shared libraries。

Linux and Mac OS:
Set the environment variables before using the compiler. You can use the source
command to execute the shell script, ifortvars.sh or ifortvars.csh, from the
command line to set them. For example, to execute this script file for the bash shell:
source /opt/intel/fc/10.0/bin/ifortvars.sh
If you use the C shell, use the .csh version of this script file:
source /opt/intel/fc/10.0/bin/ifortvars.csh
If you want ifortvars.sh to run automatically when you start Linux or Mac OS, you
can edit your .bash_profile file and add the line above to the end of your file. For
example:
# set up environment for Intel compiler
source /opt/intel/fc/10.0/bin/ifortvars.sh
If you compile a program without ensuring the proper environment variables are set,
you will see an error similar to the following when you execute the compiled
program:
./a.out: error while loading shared libraries:
libimf.so: cannot open shared object file: No such file or directory

 

come from  《Intel® Fortran Building Applications》