ldconfig错误:不是符号链接 [英] ldconfig error: is not a symbolic link

查看:1949
本文介绍了ldconfig错误:不是符号链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行时:

    sudo /sbin/ldconfig

出现以下错误:

    /sbin/ldconfig: /usr/local/lib/ is not a symbolic link

当我运行文件时:

    file /usr/local/lib/
    /usr/local/lib/: directory

/usr/local/lib/内部,我使用了三个库.在这里我将它们称为lib1lib2lib3.

Inside /usr/local/lib/ there are three libraries that I use. I'll call them here as lib1, lib2 and lib3.

现在,当我在二进制文件上执行ldd时,结果为:

Now, when I do an ldd on my binary it results:

    lib1.so => not found
    lib2.so => not found
    lib3.so => /usr/local/lib/lib3.so (0x00216000)

但是所有这些都和/usr/local/lib/{lib1,lib2,lib3}.so放在同一个文件夹中.

But all of then are in the same folder as /usr/local/lib/{lib1,lib2,lib3}.so.

每次我运行ldconfig时,都会出现相同的错误:

Every time I run ldconfig, the same error appears:

/usr/local/lib/ is not a symbolic link

我认为/usr/local/lib应该在/etc/ld.conf.d/*.conf中声明两次,但不能:

I thought /usr/local/lib should be declared twice in /etc/ld.conf.d/*.conf, but not:

    sudo egrep '\/usr\/local' /etc/ld.so.conf.d/*
    projectA.conf.old:/usr/local/projectA/lib
    local.conf:/usr/local/lib

ld.so.conf仅包含/etc/ld.so.conf.d/*.conf,因此未处理此*.old,它引用了/usr/local/projectA/lib.

ld.so.conf only includes /etc/ld.so.conf.d/*.conf, so this *.old isn't processed, and it refers to /usr/local/projectA/lib.

一段时间后,我删除了所有的lib1和lib2(有时我在二进制文件的文件夹中对其进行了测试).

After a time tring I deleted all lib1 and lib2 (at some point I tested it on binary's folder), the same error occurs.

推荐答案

我在Oracle 11R2客户端中遇到了此问题.不知道在我到达之前,Oracle安装程序是执行此操作还是有人在这里执行此操作.不是32位,而是64位.

I ran into this issue with the Oracle 11R2 client. Not sure if the Oracle installer did this or someone did it here before i arrived. It was not 64-bit vs 32-bit, all was 64-bit.

错误是libexpat.so.1不是符号链接.

原来,有两个相同的文件,libexpat.so.1.5.2libexpat.so.1.删除有问题的文件并使其指向1.5.2版本的符号链接可导致错误消失.

It turned out that there were two identical files, libexpat.so.1.5.2 and libexpat.so.1. Removing the offending file and making it a symlink to the 1.5.2 version caused the error to go away.

感觉到您希望将众所周知的名称作为当前版本的符号链接.如果这样做,最终得到陈旧库的可能性就较小.

Makes sense that you'd want the well-known name to be a symlink to the current version. If you do this, it's less likely that you'll end up with a stale library.

这篇关于ldconfig错误:不是符号链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆