Answers:
我已经使用安装了readline
./configure, make, make install
。最后问我install: you may need to run ldconfig
。
所以你只需要运行命令
sudo ldconfig
ldconfig是用于维护共享库高速缓存的程序。此缓存通常存储在文件中/etc/ld.so.cache
,系统将其用于将共享库名称映射到相应共享库文件的位置
man ldconfig
ldconfig - configure dynamic linker run-time bindings
DESCRIPTION
ldconfig creates, updates, and removes the necessary links and cache
(for use by the run-time linker, ld.so) to the most recent shared
libraries found in the directories specified on the command line, in
the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and
/lib). ldconfig checks the header and file names of the libraries it
encounters when determining which versions should have their links
updated. ldconfig ignores symbolic links when scanning for libraries.
有关更多信息,请参见:做什么-ldconfig-do?
更新:解决方案 -bash: ldconfig: command not found
如以下评论所述,当您运行echo $PATH
赠予时
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
while ldconfig
位于/ sbin内(位于PATH之外),因此您必须按绝对路径(如)运行命令/sbin/ldconfig
或更正路径。
要更正PATH,请执行以下操作:
gedit ~/.bashrc
添加线
export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
现在保存并退出然后源 .bashrc
source .bashrc
所以现在您可以直接使用命令
ldconfig --version
?
echo $PATH