Shared Library Issues In Linux

Written By
Web Webster
Web Webster
Apr 11, 2010

[ Thanks to Jeremy
Mack Wright
for this link. ]

“Shared libraries are one of the many strong design
features of Linux, but can lead to headaches for inexperienced
users, and even experienced users in certain situations. Shared
libraries allow software developers keep the size of their
application storage and memory footprints down by using common code
from a single location. The glibc library is a good example of
this. There are two standardized locations for shared libraries on
a Linux system, and these are the /lib and /usr/lib directories. On
some distributions /usr/local/lib is included, but check the
documentation for your specific distribution to be sure. These are
not the only locations that you can use for libraries though, and
I’ll talk about how to use other library directories later.
According to the Filesystem Hierarchy Standard (FHS), /lib is for
shared libraries and kernel modules that are required for startup
and running in the root filesystem (/bin and /sbin), and /usr/lib
holds most of the internal libraries that are not meant to be
executed directly by users or shell scripts. The /usr/local/lib
directory is not defined in the latest version of the FHS, but if
it exists on a distribution it normally holds libraries that
aren’t a part of the standard distribution, including
libraries that the system administrator has compiled/installed
after the initial setup. There are some other directories like
/lib/security that holds PAM modules, but for our discussion
we’ll focus on /lib and /usr/lib.

“The counterpart to the dynamically linked (shared) library is
the statically linked library. Whereas dynamically linked libraries
are loaded and used as they are needed by the applications,
statically linked libraries are either built into, or closely
associated with a program at the time it is compiled.”

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.