From 772fec9a0e7d39b1713715db88977ca07b4333b4 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely libstdc++.so.X
is missing when I
+ run my program?
libstdc++.so.X
is missing when I run
+ my program?Depending on your platform and library version, the message might + be similar to one of the following: +
++ ./a.out: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory + + /usr/libexec/ld-elf.so.1: Shared object "libstdc++.so.6" not found+ +
This doesn't mean that the shared library isn't installed, only
+ that the dynamic linker can't find it. When a dynamically-linked
+ executable is run the linker finds and loads the required shared
+ libraries by searching a pre-configured list of directories. If
+ the directory where you've installed libstdc++ is not in this
+ list then the libraries won't be found. The simplest way to fix
+ this is to use the LD_LIBRARY_PATH
environment
+ variable, which is a colon-separated list of directories in which
+ the linker will search for shared libraries:
+
+ LD_LIBRARY_PATH=${prefix}/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH+
The exact environment variable to use will depend on your platform, + e.g. DYLD_LIBRARY_PATH for Darwin, + LD_LIBRARY_PATH_32/LD_LIBRARY_PATH_64 for Solaris 32-/64-bit, + LD_LIBRARYN32_PATH/LD_LIBRARY64_PATH for Irix N32/64-bit ABIs + and SHLIB_PATH for HP-UX. +
+See the man pages for ld(1)
, ldd(1)
and
+ ldconfig(8)
for more information. The dynamic linker
+ has different names on different platforms but the man page is
+ usually called something such as ld.so / rtld / dld.so
.
+