So I've edited my /etc/ld.so.conf
file and now it looks like this:
include /opt/intel/mkl/lib/intel64_lin
include /etc/ld.so.conf.d/*.conf
include /usr/local/lib
I've tried running sudo ldconfig -v
, but in the output it does not seem to even attempt to load the MKL library directory. When I try to run a program using MKL it fails. However, if I add a symbolic link to the correct library in /usr/local/lib
which gets added from /etc/ld.so.conf.d/libc.conf
it works. Obviously this is an easy solution, but I'm trying to understand why my ldconfig
fails?
You have to add library or directory itself:
/full/Path/to/library.so/or/directory
to /etc/ld.so.conf
file
You must remove include word before directory in your config file.
From man ldconfig
:
The ldconfig utility is used to prepare a set of ``hints'' for use by the dynamic linker to facilitate quick lookup of shared libraries available in multiple directories.
<...>Files named on the command line are expected to contain directories to scan for shared libraries. Each directory's pathname must start on a new line. Blank lines and lines starting with the comment character `#' are ignored. Filenames must conform to the lib*.so.[0-9] pattern in order to be added to the hints file.
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.