当动态编译时,在执行程序出现如下提示时:
./demo: error while loading shared libraries: libxml++-1.0.so.1: cannot open shared object file: No such file or directory
这里的解决办法是:
# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
# echo "/usr/local/libxml/lib/" >> /etc/ld.so.conf
# ldconfig -v
# ldconfig -v
或者
export LD_LIBRARY_PATH=/usr/local/libxml/lib/:$LD_LIBRARY_PATH //这是临时会话时有用