Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1077617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:36:05+00:00 2026-05-16T21:36:05+00:00

When I do ls -l in /usr/lib I see lots of libs with sameName.so.*.*

  • 0

When I do ls -l in /usr/lib I see lots of libs with "sameName.so.*.*" extension.

  1. What is the significance of these extensions?
  2. Why softlinks are created? what are their use?

One example will help a lot in understanding.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:36:06+00:00Added an answer on May 16, 2026 at 9:36 pm

    This is a trick used to version shared object files. It’s a way of avoiding the dreaded DLL hell which came about because of lazy linking.

    The advantage of lazy linking (or late binding) is that components of your executable can be changed without actually re linking those executables. This allows for bug fixes in third party components without having to ship a new executable, among other things.

    The disadvantage is exactly the same as the advantage. Your executable can find that assumptions it made about the underlying libraries have been changed and this is likely to cause all sorts of issues.

    Versioning of shared objects is one way to avoid this. Another would be to not share objects at all but that also has pros and cons which I won’t get into here.

    By way of example, let’s say you have version 1 of xyz.so. You have a file and a symbolic link to that file:

    pax> ls -al xyz*
    -rw-r--r--  1 pax paxgroup    12345 Nov 18  2009 xyz.so.1
    lrwxrwxrwx  1 pax paxgroup        0 Nov 18  2009 xyz.so -> xyz.so.1
    

    Now, when you create an executable file exe1, linking it with xyz.so, it will follow the symbolic link so that it stores xyz.so.1 in the executable as the thing it needs to load at runtime.

    That way, when you upgrade the shared library thus:

    pax> ls -al xyz*
    -rw-r--r--  1 pax paxgroup    12345 Nov 18  2009 xyz.so.1
    -rw-r--r--  1 pax paxgroup    67890 Nov 18  2009 xyz.so.2
    lrwxrwxrwx  1 pax paxgroup        0 Nov 18  2009 xyz.so -> xyz.so.2
    

    your original executable exe1 will still load version 1 of the shared object.

    However, any executables you create now (such as exe2) will be linked with version 2 of the shared object.


    The actual implementation details may vary somewhat (I’m basing my answer on earlier UNIXes and Linux appears to do versioning a little more intelligently than just following symbolic links). IBM developerWorks has a nice article on how it’s done here.

    When you create a shared object, you give it both a real name and an soname. These are used to install the shared object (which creates both the object and a link to it).

    So you can end up with the situation:

    pax> ls -al xyz*
    -rw-r--r--  1 pax paxgroup    12345 Nov 18  2009 xyz.so.1.5
    lrwxrwxrwx  1 pax paxgroup        0 Nov 18  2009 xyz.so.1 -> xyz.so.1.5
    lrwxrwxrwx  1 pax paxgroup        0 Nov 18  2009 xyz.so -> xyz.so.1
    

    with xyz.so.1.5 possessing the SONAME of xyz.so.1.

    When the linker links in xyz.so, it follows the links all the way to xyz.so.1.5 and uses its SONAME of xyz.so.1 to store in the executable. Then, when you run the executable, it tries to load xyz.so.1 which will point to a specific xyz.so.1.N (not necessarily version 1.5).

    So you could install xyz.so.1.6 and update the xyz.so.1 link to point to it instead and already-linked executables would use that instead.

    One advantage of this multi-layer method is that you can have multiple potentially incompatible libraries of the same name (xyz.so.1.*, xyz.so.2.*) but, within each major version, you can freely upgrade them since they’re supposed to be compatible.

    When you link new executables:

    • Those linking with xyz.so will get the latest minor version of the latest major version.
    • Others linking with xyz.so.1 will get the latest minor version of a specific major version.
    • Still others linking with xyz.so.1.2 will get a specific minor version of a specific major version.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Term::ReadLine::Stub::new(/usr/lib/perl5/5.8.8/Term/ReadLine.pm:243): I was expecting to see Term::ReadLine::new , which is generally the case when
I have installed pycrypto (version 2.3) to /usr/local/lib/python2.6/dist-packages/Crypto/ and I am able to see
If I run gcc a.c -L /usr/lib -lexpat and both libexpat.a and libexpat.so are
I install plugin open_id_authentication and have this error: /usr/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require': no such file to
For example, how to get the version of /usr/lib/libz.a? It will be great if
In Python, I'm getting an error because it's loading a module from /usr/lib/python2.6/site-packages but
rpmbuild is located at /xenv/OS/ia64/RH4.0AS_U4/x86_64/usr/bin/ and brp-compress is located at /xenv/OS/ia64/RH4.0AS_U4/x86_64/usr/lib/rpm/, but when I
Looking in my /usr/local/lib/python.../dist-package directory, I have .egg directories and .egg files. Why does
I have an awesome trouble with Gem. After executing this command: rm -f /usr/local/lib/ruby/gems/1.9.1/cache/*
sudo gem install perftools.rb -p http://10.10.10.10:3128 ... /usr/local/lib/ruby/1.9.1/net/http.rb:762:in initialize: Connection refused - connect(2) (Errno::ECONNREFUSED)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.