编译一个程序,
./configure
make
两步都通过了,make install 报错
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during executionadd LIBDIR to the `LD_RUN_PATH' environment variable
during linkinguse the `-Wl,-rpath -Wl,LIBDIR' linker flag
have your system administrator add LIBDIR to `/etc/ld.so.conf'
请问,如何处理?
哪里有报错?
这是告诉你接下来要怎么用。简单的办法是在
/etc/ld.so.conf.d
下新建一个文件local.conf
,里边写上/usr/local/lib
。然后以 root 权限执行ldconfig
。这样你的系统才会找得到安装到 /usr/local/lib 下的库文件。