当我试图运行vtysh进行一些网络模拟时,我得到了下面的错误
vtysh: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory目前,我已经安装了libreadline和li威line-7,并创建了指向lifiline.so.7 at /lib/x86_64-linux-gnu/ligroline.so.6的符号链接,但徒劳无功。我假设它可能在寻找一条不同的路径,但我不知道如何解决这样的问题。
下面的建议没有这么好的结果。按照下面的建议,从源代码编译readline6.3之后,ldconfig -v | grep readline的输出是:
/sbin/ldconfig.real: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
libreadline.so.6 -> libreadline.so.6.3
libreadline.so.7 -> libreadline.so.7.0
/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.27.so is the dynamic linker, ignoring
libguilereadline-v-18.so.18 -> libguilereadline-v-18.so.18.0.0
/home/gdc/Desktop/readline-6.3:
/sbin/ldconfig.real: /lib32/ld-2.27.so is the dynamic linker, ignoring发布于 2021-07-16 21:47:03
由于创建符号链接不起作用,您唯一的其他选择是从源代码编译代码并将其添加到环境中。您可以在这里获得readline-6.3的源代码:
http://ftp.gnu.org/gnu/readline/
编译完它之后,创建一个文件/etc/ld.so.con.d/x86_64_readlin-gnu.conf,并根据编译位置输入行/path/to/readline/lib。之后,运行命令:
ldconfig -v | grep readline您将看到libreadline.so.6在您的环境中,并且vtysh将没有问题地运行。
https://unix.stackexchange.com/questions/658725
复制相似问题