首页 > Libraries have been installed in: /usr/local/lib

Libraries have been installed in: /usr/local/lib

编译一个程序,
./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:

请问,如何处理?


这个不是错误。但是如果忽略的话,很可能白装了。
一般Linux系统缺省不会去/usr/local/lib找库文件。所以才有上面的警告。除了把该路径加入ldconfig之外,另外一个办法是用

./configure --prefix=/usr

来指定安装到缺省路径。(有个风险:别覆盖了系统原有的东西)


哪里有报错?

这是告诉你接下来要怎么用。简单的办法是在 /etc/ld.so.conf.d 下新建一个文件 local.conf,里边写上 /usr/local/lib。然后以 root 权限执行 ldconfig。这样你的系统才会找得到安装到 /usr/local/lib 下的库文件。

【热门文章】
【热门文章】