bash ldconfig - LD_LIBRARY_PATH 不是已知的库类型

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8665074/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 01:13:40  来源:igfitidea点击:

ldconfig - LD_LIBRARY_PATH is not a known library type

linuxbashshell

提问by CONvid19

Since a couple of days ago I'm getting this error below whenever I install any package with shared libraries:

从几天前开始,每当我安装任何带有共享库的软件包时,都会出现以下错误:

"/sbin/ldconfig: $LD_LIBRARY_PATH:/usr/local/lib; export LD_LIBRARY_PATH is not a known library type"

Why I'm getting this error ? How can I solve it ?

为什么我收到这个错误?我该如何解决?

回答by Francis Upton IV

Sounds like something got messed up with ldconfig, try

听起来像是 ldconfig 搞砸了,试试

sudo /sbin/ldconfig -v

回答by Tim

Most likely the format in one of the files in /etc/ld.so.conf.d/is messed up. These files just contain paths or comments (lines starting with #) -- anything else will lead to problems similar to the one you are experiencing.

很可能是其中一个文件的格式/etc/ld.so.conf.d/搞砸了。这些文件只包含路径或注释(以 开头的行#)——其他任何内容都会导致与您遇到的问题类似的问题。