Thursday, July 26, 2018

Where Things go - Intro

Where things go when packages are installed?

Introduction


When we issue "yum install package-name", before we know the inside, these look magic.  With the magic "install" command, nice things happen without our understanding of "what just happened."  That's the purpose of package manager software such as yum, apt, brew, or even language specific pip.  Thanks to the open source developers' hard works and great contributions, we can just enjoy the magic they designed.
Sometimes, we wonder the details of what these package managers do.  Where do thing go after magic?  How these things available like magic after just one simple command?  Knowing about this is also useful sometimes.  For example, when libraries conflicted, or packages are installed, but libraries are not found, the details of packages will help to resolve the situations.
In summary, packages are composed of files, and package manager places them to be visible by convention or provided config.  The convention starts from old Unix convention.  This convention evolved while Linux has been modernized.  The conventions are not only for OS distro, but also languages set up their own.  Here Distro means the community packaging the OS.  For rexample, Fedora Linux and Ubuntu Linux are the two most popular Linux distro.  Python pip has certain rules to search libraries, for instance.   Each package manager will lay out package files differently, but they resemble each other.

This topic will be covered in multiple posts.  We will start with Unix executable paths and library paths.  Then, we will case study several package managers, and conclude with summary.

No comments: