3

I made a specified config file which indicated my specified dynamic library path under /etc/ld.so.conf.d/ and ran the ldconfig command.

After that, one symbolic link to my specified dynamic library was automatically generated. I guess it was the normal behaviour for ldconfig.

The problem is that if I delete my config file which was put in /etc/ld.so.conf.d/ and my specified dynamic library, and then run the ldconfig command, the symbolic link wasn't deleted by ldconfig.

I'd like to know if this was the normal behaviour for ldconfig and how can I work around this problem.

3
  • Hmm I find some pages saying that ldconfig should remove symlinks when updating if appropriate but no clear examples...
    – Zanna
    Aug 13 '16 at 8:36
  • Would you like to share some of the links ? @Zanna
    – FPanda
    Aug 15 '16 at 2:31
  • here and here (halfway down - "How Do I Delete a Library Path?"
    – Zanna
    Aug 15 '16 at 6:25
2

ldconfig is completely depending on the specified config file you put in /etc/ld.so.conf.d or specified in /etc/ld.so.conf file.

If you delete some dynamic libraries which have already been cached in ldconfig, and then the symbol links which created by ldconfig will be deleted automatically if you ran the ldconfig after your deletion.

But if you delete your specified config file as well before you ran the ldconfig command, the broken symbol links can't be deleted.

0

Yes, this seems normal. The manpage for ldconfig says nothing about deleting links, only creating them.

For more info:

man ldconfig
2
  • 1
    So user should delete the symbol link by themselves? OMG...
    – FPanda
    Aug 12 '16 at 9:11
  • Sure, if you don't want them anymore and they are useless, go ahead and delete the symbolic links.
    – mchid
    Aug 12 '16 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.