5- Managed shared libraries and packages Management Flashcards
Any shared library file namw will have … in it
.so (shared object file which is a library)
shared library locations
shared files between system and users
generally found in /lib/, usr/lib, /usr/lib64, /usr/local/lib
static linking to shared libraries
Applications CONTAIN a full copy of the .so aka shared library file.
The contained library has all the characteristics expected by the application.
The library is that it is a fixed version and so doesn’t have the updates and fixes of later versions
ldd
list of libraries that the application uses
ldd to know different libraries required
Ex : Which sshd –> ldd /usr/sbin/sshd
ldconfig
Updates ld.so.cache file (located in /etc/)
creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories ( /lib/, usr/lib, /usr/lib64, /usr/local/lib)
what’s /etc/ld.so.conf
It holds path settings which point to directories that hold (dynamic) libraries. It’s used by ldconfig to create necessary links and cache.
Programs, when dynamicaly compiled, need libraries to run. In general ld.so.conf holds the basic directories where these libs can be found. Sometimes you have to add another line to that file.
aptitude vs synaptic
GUI based applications for Debian package management.
where are the Debian package configuration files?
/etc/apt
source.list
define the repositories that come with the system, which it means the repositories that will be installed during system installation.
Two type of repositories are defined in source.list
deb repositories: which is a binary repository which will install libraries, application packages, ..etc
deb-src repository it contains the related source code for the packages that identified by deb repository
- Debian/ubuntu use a nick name (trusty used in 16.04 distribution) in url repository to pull information.
- restricted keyword it means a restricted software that it does not require license
- universe that software is not supported it means that it would not get software update.
Command to update system app
apt-get update
- Any changes in repository configuration file required this command.
- This command updates all the repository to get a list of all the packages for each one of the URLs
/etc/apt/source.list.d
directory in Ubuntu/Debian where third-party (non Ubuntu or Debian) repositories can be added
How to add a new third-party repository for apt?
create a file in /etc/sources.list.d with the URL, and other qualifiers, then run apt-get update to refresh your local repo cache.
apt-get upgrade
- must be used after apt-get update
- it updates the existing system and any installed software to the newest version that reported from the configuration repository for this distribution.
- to upgrade the system: apt-get dist-upgrade
to remove app
apt-get remove app
- it does not remove config files that has been changed