Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

Simplify Your Life By Leveraging Source Packages In Your LINUX Environment

📄 Contents

  1. Simplify Your Life By Leveraging Source Packages In Your LINUX Environment
  2. Making Your Package Match Your Environment
System administrator Tony Mancill discusses using package-management tools to exercise version control in your environment. Specific examples are given using the Debian GNU/Linux toolset, but the strategy is applicable to all Linux distributions that support the notion of source packages.

    I am in blood
    Stepp'd in so far that, should I wade no more,
    Returning were as tedious as go o'er.

    — Macbeth, Act III: Scene 4 (Shakespeare)

If you've worked with computers for a long time, you've probably encountered the situation where you need to upgrade foo, only to realize that it depends on a new version of bar, and upgrading bar means upgrading a dozen other things. Or even worse, you can't upgrade foo because it depends on bar-2.0, but frotz only works with bar-1.5… In the first case, your upgrade of foo is complicated by a heap of work that you didn't plan on; in the second, you're prevented from using the features in foo because you can't afford to break frotz.

Conflicting package requirements can be problematic, but strictly-enforced package dependencies also keep your system stable by forcing you to recognize that you have to choose between foo's new functionality and frotz. Consider the alternative where bar automatically upgrades foo for you and breaks frotz forever—you're performing the upgrade after hours and don't find out about it until the seething manager of the frotz users corners you in your cubicle on Monday morning. The cute mascot and geek cruises notwithstanding, package dependencies are one of the main reasons that Linux is popular with production folks who understand change control and how hard it is to implement without good tools. Package dependencies are not unique to Linux and technically are not even part of Linux—they're a function of the distribution of the operating system and that distribution's package-management toolset. However, the major distributions nowadays do enforce dependencies, which keeps administrators focused on productive work instead of reloading the operating system because software package X killed the box.

So there are safeguards in place to keep you from stepping into something that is just as murderous to finish as it is to undo (apologies to Shakespeare). This is useful, but often suboptimal. You may really really need the functionality in foo and the old frotz. Furthermore, you don't want to have to wade through a dozen seemingly unrelated upgrades during your short outage window, just to run the latest version of foo. This article discusses the nature of these dependencies and how you can—and why you should—use a distribution's package tools to keep your important packages current, without having to constantly upgrade to the latest release of your distribution. The same procedure can be used to apply security patches, fixes, and new functionality to systems running versions that are no longer supported by your distribution (also known as backporting).

The following examples are Debian specific, but the techniques are applicable to all distributions that support the notion of dependencies and source packages. This includes Red Hat and its derivatives.

Packages and Interdependencies

First, let's take a look at why dependencies prevent certain upgrades. The most prevalent type of dependency is a shared-library dependency based on the compile environment used to build the package. All binaries that are dynamically linked (that's most of them!) need to be able to find largely similar library versions to link against at run time in order to execute properly. I use the word "largely" because few programs use all the functions in a shared library, and new versions of shared libraries don't always update every function—or they update the functions in a way that breaks the calling interface. That being said, taking a binary compiled against library version X and moving it to a system with library version Y is about the quickest way I know to get a segmentation fault. If you want to see the list of libraries that a binary needs to execute, use the ldd command:

tony@bach:/home/tmancill$ ldd -v /bin/grep
        libc.so.6 => /lib/libc.so.6 (0x4001f000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

        Version information:
                libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
                ld-linux.so.2 (GLIBC_2.1.1) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.2) => /lib/ld-linux.so.2

                ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2

Here we see that the /bin/grep executable only needs libc.so.6 and version 2 of the dynamic linker (ld-linux.so.2) to run. The -v switch gives us more information about the versions of glibc that grep is compatible with, and then the versions of glibc that our libc.so.6 is compatible with. Since there's a union to the set of these versions, grep should run with no problem. Now, ldd hasn't always been so generous with version information, and a glibc 2.0– or 2.1–based system may give results like these:

tony@dvorak:/home/tony$ ldd -v /bin/grep
ldd: version 1.9.10
        libc.so.6 => /lib/libc.so.6 (0x4000e000)

        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

This will catch a glaring problem, such as a program linked against libc5 and the lack of libc5 libraries on the system, but it won't catch subtle glibc version issues. When you're uncertain, use the following rule, taken from the glibc 2.2 source package (and see the man pages for ldd, ld.so, and ldconfig):

The 2.2 release should be binary compatible with the 2.1 and earlier releases. All programs should continue to run. This does *not* mean that programs compiled on a system running glibc 2.2 will run on systems with only glibc 2.1. Compatibility is always in one direction. Systems with glibc 2.1 will not even attempt to run binaries generated with glibc 2.2 so there is not much to worry about.

When a developer builds the package foo, the package-creation tools note the libraries that the foo binary links against in the package dependencies. More often than not, developers are building their binaries on the latest versions of libraries because they're building packages for the upcoming release of their distribution. Hence, foo-2.0 may require libc-6.1 (also known as glibc-2.1), while your system is based on libc-6.0.

So you need foo-2.0. One option is to go find the source for the package on http://freshmeat.net/, download the tarball, and build it on your libc-6.0 system. If the program configures and compiles correctly, chances are it will run fine on your system. This does get you a working copy of foo-2.0 on your system, but it has a serious drawback. Because the package is not under the control of the package management system, you'll encounter the following problems:

  • It won't be taken into consideration the next time the other packages are upgraded. Thus, a future upgrade could break the package, either by replacing a library without foo's knowledge, or even replacing one of foo's files (oh please, don't let it be a configuration file!).

  • At some future date, you may want to use the package manager to generate a complete inventory of the software installed on your box. foo won't show up.

  • The package manager enforces a certain consistency across all packages, such as the location of startup and shutdown scripts, man pages, sample configuration files, and so on. The upstream (original) foo has no such limitations, and may or may not conform to the same filesystem standards as your distribution.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020