SlideShare a Scribd company logo
1 of 12
Junior Level Linux Certification
Exam Objectives
Key Knowledge Areas
Identify shared libraries.
Identify the typical locations of system libraries.
Load shared libraries.
Objective 2: Linux Installation and Package Management
Manage shared libraries Weight: 1
Terms and Utilities
ldd
ldconfig
/etc/ld.so.conf
LD_LIBRARY_PATH
2
Manage shared libraries
When source code is written, programmers do not rewrite code for common operations.
These operations are written once and used again by many other programmers.
These common operations are stored in what are called libraries.
For an application to successfully compile and run, it needs access to the libraries it was
written to use.
Dependencies of executable programs on shared libraries
3
Statically compiled applications.
Some source code compiles libraries into final executable - Dont need the libraries to run.
dynamically compiled applications.
Applications linked to the libraries during compile and must access to the library files later.
statically compiling makes the application larger than a dynamically compiled version.
Manage shared libraries
Ex. on many Linux systems is ln cmd (/bin/ln), which creates links between files, either hard
links or soft (or symbolic) links.
This cmd uses shared libraries.
Shared libraries involve symbolic links between a generic name for the library and a specific
level of the library, if not present or broken, the ln command itself might be inoperative.
Progs with dynamically shared libraries and statically linked versions
4
To protect against this possibility, some Linux systems include a statically linked version of the
ln program as the sln program (/sbin/sln).
Example: Fedora12 64-bit - difference in size between dynamically linked ln and statically linked sln.
yourname@yourcomp~$ ls -l /sbin/sln /bin/ln
-rwxr-xr-x. 1 root root 47384 2010-01-12 09:35 /bin/ln
-rwxr-xr-x. 1 root root 603680 2010-01-04 09:07 /sbin/sln
Ex:
Statically linked programs are likely to be larger
Manage shared libraries
Linux’s shared libraries are stored in several paths:
/lib Main shared libraries
/usr/lib Supplemental libraries
/usr/X11R6/lib Shared libraries for X Window
Path and Naming convention
5
Shared libraries naming convention:
libraryname-major-minor-patch.so (so extension stands for shared object)
Example: libcrypt-2-1-3.so
name of library: libcrypt. major version: 2 minor version: 1 patch level: 3
In many cases there’s symbolic links to the shared library. These are named as:
libraryname.so libraryname.so.major
Example: libcrypt.so libcrypt.so.2
These links allow software to point to them instead of the actual file. This way the minor version and patch
level can change without breaking the association.
Manage shared libraries
Linux systems run on hardware that supports 32-bit and 64-bit executables.
Many libraries are thus compiled in 32-bit and 64-bit versions.
ldd Output: Viewing required shared libraries
6
64-bit versions are stored under /lib64; 32-bit versions live in the traditional /lib tree.
Libraries /lib64/libc-2.11.1.so and /lib/libc-2.11.1.so allow C Progs of 64-bit and 32-bit to run on Linux 64-bit System.
To see which libraries an application uses, use command: ldd file_name
~/usr/bin# ldd wget
libc.so.6 => /lib/libc.so.6 (0x40020000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Ex:
wget uses libraries libc.so version 6 and ld-linux.so version 2.
Manage shared libraries
ldd Output: Dependencies between libraries
7
Left hand column indicates what the program would like to be linked to (no path name given),
Right hand column shows what the program will actually be linked to (full path and often a symbolic link)
~/usr/bin# ldd /bin/bash
libtermcap.so.2 => /lib/libtermcap.so.2 (0x40024000)
libdl.so.2 => /lib/libdl.so.2 (0x40028000)
libc.so.6 => /lib/libc.so.6 (0x4002b000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Ex:
When programs are loaded into memory, part of loading process is to make sure that relevant shared
libraries are loaded when the program loads.
A library can require other libraries. Dependencies are normal for large applications.
A program may use a graphics library, which can use the X11 library, which in turn uses the C library.
~$ ls -lg /lib/libc.so.6
lrwxrwxrwx 1 root 14 Oct 14 10:47 /lib/libc.so.6 -> libc-2.2.93.so
~$ ls -lg /lib/libc-2.2.93.so
-rwxr-xr-x 1 root 1327065 Sep 6 2002 /lib/libc-2.2.93.so
bash asked to link to libc.so.6, and it ended up linking to /lib/libc2.2.93.so.
Manage shared libraries
ldd Output: types of information
8
Ex: In Fedora 12 64-bit system (echidna). ln cmd needs 3 shared libraries:
~$ ldd /bin/ln
linux-vdso.so.1 => (0x00007fff644af000)
libc.so.6 => /lib64/libc.so.6 (0x00000037eb800000)
/lib64/ld-linux-x86-64.so.2 (0x00000037eb400000)
1.(linux-vdso.so.1) is the Linux Virtual Dynamic Shared Object.
Necessary logic to allow user programs to access system functions through fastest means available on the processor.
Either by interrupt, or for most newer CPUs by fast system call.
Types of ldd info: (1) Linux Virtual Dynamic Shared Objects; (2) Pointers; (3) Absolute paths.
2.(libc.so.6) has a pointer to /lib64/libc.so.6.
3.(/lib64/ld-linux-x86-64.so.2) is the absolute path to another library.
~$ ls -l /lib64/libc.so.6 /lib64/ld-linux-x86-64.so.2
lrwxrwxrwx. 1 root root 12 2010-01-14 14:24 /lib64/ld-linux-x86-64.so.2 -> ld-2.11.1.so
lrwxrwxrwx. 1 root root 14 2010-01-14 14:24 /lib64/libc.so.6 -> libc-2.11.1.so
ls -l cmd shows that last 2 libraries are, in turn, symbolic links to specific versions of the libraries.
Manage shared libraries
Configuring shared libraries
9
If a shared library is installed manually by editing the LIBRARY CONFIGURATION FILE , you must
manually inform the system to use the new libraries.
(with ldconfig)
The LIBRARY CONFIGURATION FILE is in:
/etc/ld.so.conf and /etc/ld.so.cache - contains the directories to be searched for shared libraries.
/etc/ld.so.conf specifies that all the .conf files from subdirectory ld.so.conf.d should be included.
Older systems may have all entries in /etc/ld/so/conf and not include entries from /etc/ld.so.conf.d
Ex: ~$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
~$ ls /etc/ld.so.conf.d/*.conf
/etc/ld.so.conf.d/kernel-2.6.31.12-174.2.19.fc12.x86_64.conf
/etc/ld.so.conf.d/kernel-2.6.31.12-174.2.22.fc12.x86_64.conf
/etc/ld.so.conf.d/kernel-2.6.31.12-174.2.3.fc12.x86_64.conf
/etc/ld.so.conf.d/mysql-x86_64.conf
/etc/ld.so.conf.d/qt-x86_64.conf
/etc/ld.so.conf.d/tix-x86_64.conf
/etc/ld.so.conf.d/xulrunner-64.conf
Manage shared libraries
Configuring shared libraries
10
Command ldconfig Processes ld.so.conf – including the file libraries from the file, and from
the trusted directories: /lib and /usr/lib, and creates the ld.so.cache.
Ex: ~$
In summary - The ld.so.cache file is created from the ld.so.conf file by using ldconfig.
Any time that ld.so.conf file is changed, the cache file needs to be updated - Using ldconfig
Manage shared libraries
Loading and setting specific libraries paths
11
Applications can be made to load libraries from directories not listed in /etc/ld.so.conf
older apps that need specific library, developing versions of shared libraries, running scripts with product-specific shared libraries installed in /opt.
If the library is not in the standard path, you can search and add the nonstandard path with:
LD_LIBRARY_PATH environment variable.
export LD_LIBRARY_PATH=/usr/lib/oldstuff:/opt/IBM/AgentController/lib
If there’s more than 1 list of directories to search, separate them by colon.
Export LD_LIBRARY_PATH=/usr/newpath
LD_PRELOAD: Specifies libraries containing symbols that override symbols in the real
libraries.
LD_PRELOAD is seldom used except for debugging and compatibility applications (SOCKS proxy support).
Add the /usr/newpath to the list of searched directories for libraries.
Ex:
Ex:
Fim de sessão
12

More Related Content

What's hot

Unix files
Unix filesUnix files
Unix filesSunil Rm
 
Lpi lição 01 exam 102 objectives
Lpi lição 01  exam 102 objectivesLpi lição 01  exam 102 objectives
Lpi lição 01 exam 102 objectivesAcácio Oliveira
 
The linux file system structure
The linux file system structureThe linux file system structure
The linux file system structureTeja Bheemanapally
 
101 4.5 manage file permissions and ownership
101 4.5 manage file permissions and ownership101 4.5 manage file permissions and ownership
101 4.5 manage file permissions and ownershipAcácio Oliveira
 
intro unix/linux 02
intro unix/linux 02intro unix/linux 02
intro unix/linux 02duquoi
 
Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals  Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals Sadia Bashir
 
Linux Administration
Linux AdministrationLinux Administration
Linux AdministrationHarish1983
 
101 4.2 maintain the integrity of filesystems
101 4.2 maintain the integrity of filesystems101 4.2 maintain the integrity of filesystems
101 4.2 maintain the integrity of filesystemsAcácio Oliveira
 
Commands and shell programming (3)
Commands and shell programming (3)Commands and shell programming (3)
Commands and shell programming (3)christ university
 
Gnu study guide linux admin 1 (lab work lpi 101) v 0.2
 Gnu study guide linux admin 1 (lab work lpi 101) v 0.2 Gnu study guide linux admin 1 (lab work lpi 101) v 0.2
Gnu study guide linux admin 1 (lab work lpi 101) v 0.2Acácio Oliveira
 
Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems senthilamul
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)anandvaidya
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumarymentorsnet
 
Xfs file system for linux
Xfs file system for linuxXfs file system for linux
Xfs file system for linuxAjay Sood
 
The sysfs Filesystem
The sysfs FilesystemThe sysfs Filesystem
The sysfs FilesystemJeff Yana
 

What's hot (20)

Unix files
Unix filesUnix files
Unix files
 
Lpi lição 01 exam 102 objectives
Lpi lição 01  exam 102 objectivesLpi lição 01  exam 102 objectives
Lpi lição 01 exam 102 objectives
 
1.2 boot the system v2
1.2 boot the system v21.2 boot the system v2
1.2 boot the system v2
 
The linux file system structure
The linux file system structureThe linux file system structure
The linux file system structure
 
101 4.5 manage file permissions and ownership
101 4.5 manage file permissions and ownership101 4.5 manage file permissions and ownership
101 4.5 manage file permissions and ownership
 
intro unix/linux 02
intro unix/linux 02intro unix/linux 02
intro unix/linux 02
 
Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals  Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals
 
Linux: Basics OF Linux
Linux: Basics OF LinuxLinux: Basics OF Linux
Linux: Basics OF Linux
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
101 4.2 maintain the integrity of filesystems
101 4.2 maintain the integrity of filesystems101 4.2 maintain the integrity of filesystems
101 4.2 maintain the integrity of filesystems
 
Commands and shell programming (3)
Commands and shell programming (3)Commands and shell programming (3)
Commands and shell programming (3)
 
Operating system lab manual
Operating system lab manualOperating system lab manual
Operating system lab manual
 
Gnu study guide linux admin 1 (lab work lpi 101) v 0.2
 Gnu study guide linux admin 1 (lab work lpi 101) v 0.2 Gnu study guide linux admin 1 (lab work lpi 101) v 0.2
Gnu study guide linux admin 1 (lab work lpi 101) v 0.2
 
Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumary
 
Xfs file system for linux
Xfs file system for linuxXfs file system for linux
Xfs file system for linux
 
Unix File System
Unix File SystemUnix File System
Unix File System
 
The sysfs Filesystem
The sysfs FilesystemThe sysfs Filesystem
The sysfs Filesystem
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 

Viewers also liked

101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and reboot101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and rebootAcácio Oliveira
 
Apend. networking generic a
Apend. networking generic aApend. networking generic a
Apend. networking generic aAcácio Oliveira
 
101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processesAcácio Oliveira
 
Lpi 101 study_guide
Lpi 101 study_guideLpi 101 study_guide
Lpi 101 study_guideousman1
 
Lpi Part 1 Linux Fundamentals
Lpi Part 1 Linux FundamentalsLpi Part 1 Linux Fundamentals
Lpi Part 1 Linux FundamentalsYemenLinux
 
Linux Network Administration (LPI-1,LPI-2)
Linux Network Administration (LPI-1,LPI-2)Linux Network Administration (LPI-1,LPI-2)
Linux Network Administration (LPI-1,LPI-2)laonap166
 

Viewers also liked (9)

101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and reboot101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and reboot
 
101 1.1 hardware settings
101 1.1 hardware settings101 1.1 hardware settings
101 1.1 hardware settings
 
Apend. networking generic a
Apend. networking generic aApend. networking generic a
Apend. networking generic a
 
Licão 03 vi editor
Licão 03 vi editorLicão 03 vi editor
Licão 03 vi editor
 
101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes
 
Lpi 101 study_guide
Lpi 101 study_guideLpi 101 study_guide
Lpi 101 study_guide
 
Lpi Part 1 Linux Fundamentals
Lpi Part 1 Linux FundamentalsLpi Part 1 Linux Fundamentals
Lpi Part 1 Linux Fundamentals
 
Linux Network Administration (LPI-1,LPI-2)
Linux Network Administration (LPI-1,LPI-2)Linux Network Administration (LPI-1,LPI-2)
Linux Network Administration (LPI-1,LPI-2)
 

Similar to 101 2.3 manage shared libraries

2.3 manage shared libraries
2.3 manage shared libraries2.3 manage shared libraries
2.3 manage shared librariesAcácio Oliveira
 
101 2.3 manage shared libraries
101 2.3 manage shared libraries101 2.3 manage shared libraries
101 2.3 manage shared librariesAcácio Oliveira
 
C++ shared libraries and loading
C++ shared libraries and loadingC++ shared libraries and loading
C++ shared libraries and loadingRahul Jamwal
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxnanocdac
 
Operating System Practice : Meeting 4 - operasi file dan struktur direktori-s...
Operating System Practice : Meeting 4 - operasi file dan struktur direktori-s...Operating System Practice : Meeting 4 - operasi file dan struktur direktori-s...
Operating System Practice : Meeting 4 - operasi file dan struktur direktori-s...Syaiful Ahdan
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemSadia Bashir
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338Cam YP Co., Ltd
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338Cam YP Co., Ltd
 
Basic linux architecture
Basic linux architectureBasic linux architecture
Basic linux architectureRohit Kumar
 
Nguyễn Vũ Hưng: Basic Linux Power Tools
Nguyễn Vũ Hưng: Basic Linux Power Tools Nguyễn Vũ Hưng: Basic Linux Power Tools
Nguyễn Vũ Hưng: Basic Linux Power Tools Vu Hung Nguyen
 
Advanced c programming in Linux
Advanced c programming in Linux Advanced c programming in Linux
Advanced c programming in Linux Mohammad Golyani
 
Linux@assignment ppt
Linux@assignment pptLinux@assignment ppt
Linux@assignment pptRama .
 
Case study operating systems
Case study operating systemsCase study operating systems
Case study operating systemsAkhil Bevara
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Scriptsbmguys
 
Programming Embedded linux
Programming Embedded linuxProgramming Embedded linux
Programming Embedded linuxLiran Ben Haim
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systemsalok pal
 
POS 433 Inspiring Innovation/tutorialrank.com
 POS 433 Inspiring Innovation/tutorialrank.com POS 433 Inspiring Innovation/tutorialrank.com
POS 433 Inspiring Innovation/tutorialrank.comjonhson152
 

Similar to 101 2.3 manage shared libraries (20)

2.3 manage shared libraries
2.3 manage shared libraries2.3 manage shared libraries
2.3 manage shared libraries
 
101 2.3 manage shared libraries
101 2.3 manage shared libraries101 2.3 manage shared libraries
101 2.3 manage shared libraries
 
C++ shared libraries and loading
C++ shared libraries and loadingC++ shared libraries and loading
C++ shared libraries and loading
 
Linux[122-150].pdf
Linux[122-150].pdfLinux[122-150].pdf
Linux[122-150].pdf
 
Libraries
LibrariesLibraries
Libraries
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Operating System Practice : Meeting 4 - operasi file dan struktur direktori-s...
Operating System Practice : Meeting 4 - operasi file dan struktur direktori-s...Operating System Practice : Meeting 4 - operasi file dan struktur direktori-s...
Operating System Practice : Meeting 4 - operasi file dan struktur direktori-s...
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338
 
Basic linux architecture
Basic linux architectureBasic linux architecture
Basic linux architecture
 
Nguyễn Vũ Hưng: Basic Linux Power Tools
Nguyễn Vũ Hưng: Basic Linux Power Tools Nguyễn Vũ Hưng: Basic Linux Power Tools
Nguyễn Vũ Hưng: Basic Linux Power Tools
 
Advanced c programming in Linux
Advanced c programming in Linux Advanced c programming in Linux
Advanced c programming in Linux
 
Linux@assignment ppt
Linux@assignment pptLinux@assignment ppt
Linux@assignment ppt
 
Case study operating systems
Case study operating systemsCase study operating systems
Case study operating systems
 
Linux training
Linux trainingLinux training
Linux training
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Programming Embedded linux
Programming Embedded linuxProgramming Embedded linux
Programming Embedded linux
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systems
 
POS 433 Inspiring Innovation/tutorialrank.com
 POS 433 Inspiring Innovation/tutorialrank.com POS 433 Inspiring Innovation/tutorialrank.com
POS 433 Inspiring Innovation/tutorialrank.com
 

More from Acácio Oliveira

Security+ Lesson 01 Topic 24 - Vulnerability Scanning vs Pen Testing.pptx
Security+ Lesson 01 Topic 24 - Vulnerability Scanning vs Pen Testing.pptxSecurity+ Lesson 01 Topic 24 - Vulnerability Scanning vs Pen Testing.pptx
Security+ Lesson 01 Topic 24 - Vulnerability Scanning vs Pen Testing.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 25 - Application Security Controls and Techniques.pptx
Security+ Lesson 01 Topic 25 - Application Security Controls and Techniques.pptxSecurity+ Lesson 01 Topic 25 - Application Security Controls and Techniques.pptx
Security+ Lesson 01 Topic 25 - Application Security Controls and Techniques.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 21 - Types of Application Attacks.pptx
Security+ Lesson 01 Topic 21 - Types of Application Attacks.pptxSecurity+ Lesson 01 Topic 21 - Types of Application Attacks.pptx
Security+ Lesson 01 Topic 21 - Types of Application Attacks.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 19 - Summary of Social Engineering Attacks.pptx
Security+ Lesson 01 Topic 19 - Summary of Social Engineering Attacks.pptxSecurity+ Lesson 01 Topic 19 - Summary of Social Engineering Attacks.pptx
Security+ Lesson 01 Topic 19 - Summary of Social Engineering Attacks.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 23 - Overview of Security Assessment Tools.pptx
Security+ Lesson 01 Topic 23 - Overview of Security Assessment Tools.pptxSecurity+ Lesson 01 Topic 23 - Overview of Security Assessment Tools.pptx
Security+ Lesson 01 Topic 23 - Overview of Security Assessment Tools.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 20 - Summary of Wireless Attacks.pptx
Security+ Lesson 01 Topic 20 - Summary of Wireless Attacks.pptxSecurity+ Lesson 01 Topic 20 - Summary of Wireless Attacks.pptx
Security+ Lesson 01 Topic 20 - Summary of Wireless Attacks.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 22 - Security Enhancement Techniques.pptx
Security+ Lesson 01 Topic 22 - Security Enhancement Techniques.pptxSecurity+ Lesson 01 Topic 22 - Security Enhancement Techniques.pptx
Security+ Lesson 01 Topic 22 - Security Enhancement Techniques.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 15 - Risk Management Best Practices.pptx
Security+ Lesson 01 Topic 15 - Risk Management Best Practices.pptxSecurity+ Lesson 01 Topic 15 - Risk Management Best Practices.pptx
Security+ Lesson 01 Topic 15 - Risk Management Best Practices.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 13 - Physical Security and Environmental Controls.pptx
Security+ Lesson 01 Topic 13 - Physical Security and Environmental Controls.pptxSecurity+ Lesson 01 Topic 13 - Physical Security and Environmental Controls.pptx
Security+ Lesson 01 Topic 13 - Physical Security and Environmental Controls.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 14 - Disaster Recovery Concepts.pptx
Security+ Lesson 01 Topic 14 - Disaster Recovery Concepts.pptxSecurity+ Lesson 01 Topic 14 - Disaster Recovery Concepts.pptx
Security+ Lesson 01 Topic 14 - Disaster Recovery Concepts.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 06 - Wireless Security Considerations.pptx
Security+ Lesson 01 Topic 06 - Wireless Security Considerations.pptxSecurity+ Lesson 01 Topic 06 - Wireless Security Considerations.pptx
Security+ Lesson 01 Topic 06 - Wireless Security Considerations.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 04 - Secure Network Design Elements and Components....
Security+ Lesson 01 Topic 04 - Secure Network Design Elements and Components....Security+ Lesson 01 Topic 04 - Secure Network Design Elements and Components....
Security+ Lesson 01 Topic 04 - Secure Network Design Elements and Components....Acácio Oliveira
 
Security+ Lesson 01 Topic 02 - Secure Network Administration Concepts.pptx
Security+ Lesson 01 Topic 02 - Secure Network Administration Concepts.pptxSecurity+ Lesson 01 Topic 02 - Secure Network Administration Concepts.pptx
Security+ Lesson 01 Topic 02 - Secure Network Administration Concepts.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 01 - Intro to Network Devices.pptx
Security+ Lesson 01 Topic 01 - Intro to Network Devices.pptxSecurity+ Lesson 01 Topic 01 - Intro to Network Devices.pptx
Security+ Lesson 01 Topic 01 - Intro to Network Devices.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 08 - Integrating Data and Systems with Third Partie...
Security+ Lesson 01 Topic 08 - Integrating Data and Systems with Third Partie...Security+ Lesson 01 Topic 08 - Integrating Data and Systems with Third Partie...
Security+ Lesson 01 Topic 08 - Integrating Data and Systems with Third Partie...Acácio Oliveira
 
Security+ Lesson 01 Topic 07 - Risk Related Concepts.pptx
Security+ Lesson 01 Topic 07 - Risk Related Concepts.pptxSecurity+ Lesson 01 Topic 07 - Risk Related Concepts.pptx
Security+ Lesson 01 Topic 07 - Risk Related Concepts.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 05 - Common Network Protocols.pptx
Security+ Lesson 01 Topic 05 - Common Network Protocols.pptxSecurity+ Lesson 01 Topic 05 - Common Network Protocols.pptx
Security+ Lesson 01 Topic 05 - Common Network Protocols.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 11 - Incident Response Concepts.pptx
Security+ Lesson 01 Topic 11 - Incident Response Concepts.pptxSecurity+ Lesson 01 Topic 11 - Incident Response Concepts.pptx
Security+ Lesson 01 Topic 11 - Incident Response Concepts.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 12 - Security Related Awareness and Training.pptx
Security+ Lesson 01 Topic 12 - Security Related Awareness and Training.pptxSecurity+ Lesson 01 Topic 12 - Security Related Awareness and Training.pptx
Security+ Lesson 01 Topic 12 - Security Related Awareness and Training.pptxAcácio Oliveira
 
Security+ Lesson 01 Topic 17 - Types of Malware.pptx
Security+ Lesson 01 Topic 17 - Types of Malware.pptxSecurity+ Lesson 01 Topic 17 - Types of Malware.pptx
Security+ Lesson 01 Topic 17 - Types of Malware.pptxAcácio Oliveira
 

More from Acácio Oliveira (20)

Security+ Lesson 01 Topic 24 - Vulnerability Scanning vs Pen Testing.pptx
Security+ Lesson 01 Topic 24 - Vulnerability Scanning vs Pen Testing.pptxSecurity+ Lesson 01 Topic 24 - Vulnerability Scanning vs Pen Testing.pptx
Security+ Lesson 01 Topic 24 - Vulnerability Scanning vs Pen Testing.pptx
 
Security+ Lesson 01 Topic 25 - Application Security Controls and Techniques.pptx
Security+ Lesson 01 Topic 25 - Application Security Controls and Techniques.pptxSecurity+ Lesson 01 Topic 25 - Application Security Controls and Techniques.pptx
Security+ Lesson 01 Topic 25 - Application Security Controls and Techniques.pptx
 
Security+ Lesson 01 Topic 21 - Types of Application Attacks.pptx
Security+ Lesson 01 Topic 21 - Types of Application Attacks.pptxSecurity+ Lesson 01 Topic 21 - Types of Application Attacks.pptx
Security+ Lesson 01 Topic 21 - Types of Application Attacks.pptx
 
Security+ Lesson 01 Topic 19 - Summary of Social Engineering Attacks.pptx
Security+ Lesson 01 Topic 19 - Summary of Social Engineering Attacks.pptxSecurity+ Lesson 01 Topic 19 - Summary of Social Engineering Attacks.pptx
Security+ Lesson 01 Topic 19 - Summary of Social Engineering Attacks.pptx
 
Security+ Lesson 01 Topic 23 - Overview of Security Assessment Tools.pptx
Security+ Lesson 01 Topic 23 - Overview of Security Assessment Tools.pptxSecurity+ Lesson 01 Topic 23 - Overview of Security Assessment Tools.pptx
Security+ Lesson 01 Topic 23 - Overview of Security Assessment Tools.pptx
 
Security+ Lesson 01 Topic 20 - Summary of Wireless Attacks.pptx
Security+ Lesson 01 Topic 20 - Summary of Wireless Attacks.pptxSecurity+ Lesson 01 Topic 20 - Summary of Wireless Attacks.pptx
Security+ Lesson 01 Topic 20 - Summary of Wireless Attacks.pptx
 
Security+ Lesson 01 Topic 22 - Security Enhancement Techniques.pptx
Security+ Lesson 01 Topic 22 - Security Enhancement Techniques.pptxSecurity+ Lesson 01 Topic 22 - Security Enhancement Techniques.pptx
Security+ Lesson 01 Topic 22 - Security Enhancement Techniques.pptx
 
Security+ Lesson 01 Topic 15 - Risk Management Best Practices.pptx
Security+ Lesson 01 Topic 15 - Risk Management Best Practices.pptxSecurity+ Lesson 01 Topic 15 - Risk Management Best Practices.pptx
Security+ Lesson 01 Topic 15 - Risk Management Best Practices.pptx
 
Security+ Lesson 01 Topic 13 - Physical Security and Environmental Controls.pptx
Security+ Lesson 01 Topic 13 - Physical Security and Environmental Controls.pptxSecurity+ Lesson 01 Topic 13 - Physical Security and Environmental Controls.pptx
Security+ Lesson 01 Topic 13 - Physical Security and Environmental Controls.pptx
 
Security+ Lesson 01 Topic 14 - Disaster Recovery Concepts.pptx
Security+ Lesson 01 Topic 14 - Disaster Recovery Concepts.pptxSecurity+ Lesson 01 Topic 14 - Disaster Recovery Concepts.pptx
Security+ Lesson 01 Topic 14 - Disaster Recovery Concepts.pptx
 
Security+ Lesson 01 Topic 06 - Wireless Security Considerations.pptx
Security+ Lesson 01 Topic 06 - Wireless Security Considerations.pptxSecurity+ Lesson 01 Topic 06 - Wireless Security Considerations.pptx
Security+ Lesson 01 Topic 06 - Wireless Security Considerations.pptx
 
Security+ Lesson 01 Topic 04 - Secure Network Design Elements and Components....
Security+ Lesson 01 Topic 04 - Secure Network Design Elements and Components....Security+ Lesson 01 Topic 04 - Secure Network Design Elements and Components....
Security+ Lesson 01 Topic 04 - Secure Network Design Elements and Components....
 
Security+ Lesson 01 Topic 02 - Secure Network Administration Concepts.pptx
Security+ Lesson 01 Topic 02 - Secure Network Administration Concepts.pptxSecurity+ Lesson 01 Topic 02 - Secure Network Administration Concepts.pptx
Security+ Lesson 01 Topic 02 - Secure Network Administration Concepts.pptx
 
Security+ Lesson 01 Topic 01 - Intro to Network Devices.pptx
Security+ Lesson 01 Topic 01 - Intro to Network Devices.pptxSecurity+ Lesson 01 Topic 01 - Intro to Network Devices.pptx
Security+ Lesson 01 Topic 01 - Intro to Network Devices.pptx
 
Security+ Lesson 01 Topic 08 - Integrating Data and Systems with Third Partie...
Security+ Lesson 01 Topic 08 - Integrating Data and Systems with Third Partie...Security+ Lesson 01 Topic 08 - Integrating Data and Systems with Third Partie...
Security+ Lesson 01 Topic 08 - Integrating Data and Systems with Third Partie...
 
Security+ Lesson 01 Topic 07 - Risk Related Concepts.pptx
Security+ Lesson 01 Topic 07 - Risk Related Concepts.pptxSecurity+ Lesson 01 Topic 07 - Risk Related Concepts.pptx
Security+ Lesson 01 Topic 07 - Risk Related Concepts.pptx
 
Security+ Lesson 01 Topic 05 - Common Network Protocols.pptx
Security+ Lesson 01 Topic 05 - Common Network Protocols.pptxSecurity+ Lesson 01 Topic 05 - Common Network Protocols.pptx
Security+ Lesson 01 Topic 05 - Common Network Protocols.pptx
 
Security+ Lesson 01 Topic 11 - Incident Response Concepts.pptx
Security+ Lesson 01 Topic 11 - Incident Response Concepts.pptxSecurity+ Lesson 01 Topic 11 - Incident Response Concepts.pptx
Security+ Lesson 01 Topic 11 - Incident Response Concepts.pptx
 
Security+ Lesson 01 Topic 12 - Security Related Awareness and Training.pptx
Security+ Lesson 01 Topic 12 - Security Related Awareness and Training.pptxSecurity+ Lesson 01 Topic 12 - Security Related Awareness and Training.pptx
Security+ Lesson 01 Topic 12 - Security Related Awareness and Training.pptx
 
Security+ Lesson 01 Topic 17 - Types of Malware.pptx
Security+ Lesson 01 Topic 17 - Types of Malware.pptxSecurity+ Lesson 01 Topic 17 - Types of Malware.pptx
Security+ Lesson 01 Topic 17 - Types of Malware.pptx
 

Recently uploaded

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Recently uploaded (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

101 2.3 manage shared libraries

  • 1. Junior Level Linux Certification
  • 2. Exam Objectives Key Knowledge Areas Identify shared libraries. Identify the typical locations of system libraries. Load shared libraries. Objective 2: Linux Installation and Package Management Manage shared libraries Weight: 1 Terms and Utilities ldd ldconfig /etc/ld.so.conf LD_LIBRARY_PATH 2
  • 3. Manage shared libraries When source code is written, programmers do not rewrite code for common operations. These operations are written once and used again by many other programmers. These common operations are stored in what are called libraries. For an application to successfully compile and run, it needs access to the libraries it was written to use. Dependencies of executable programs on shared libraries 3 Statically compiled applications. Some source code compiles libraries into final executable - Dont need the libraries to run. dynamically compiled applications. Applications linked to the libraries during compile and must access to the library files later. statically compiling makes the application larger than a dynamically compiled version.
  • 4. Manage shared libraries Ex. on many Linux systems is ln cmd (/bin/ln), which creates links between files, either hard links or soft (or symbolic) links. This cmd uses shared libraries. Shared libraries involve symbolic links between a generic name for the library and a specific level of the library, if not present or broken, the ln command itself might be inoperative. Progs with dynamically shared libraries and statically linked versions 4 To protect against this possibility, some Linux systems include a statically linked version of the ln program as the sln program (/sbin/sln). Example: Fedora12 64-bit - difference in size between dynamically linked ln and statically linked sln. yourname@yourcomp~$ ls -l /sbin/sln /bin/ln -rwxr-xr-x. 1 root root 47384 2010-01-12 09:35 /bin/ln -rwxr-xr-x. 1 root root 603680 2010-01-04 09:07 /sbin/sln Ex: Statically linked programs are likely to be larger
  • 5. Manage shared libraries Linux’s shared libraries are stored in several paths: /lib Main shared libraries /usr/lib Supplemental libraries /usr/X11R6/lib Shared libraries for X Window Path and Naming convention 5 Shared libraries naming convention: libraryname-major-minor-patch.so (so extension stands for shared object) Example: libcrypt-2-1-3.so name of library: libcrypt. major version: 2 minor version: 1 patch level: 3 In many cases there’s symbolic links to the shared library. These are named as: libraryname.so libraryname.so.major Example: libcrypt.so libcrypt.so.2 These links allow software to point to them instead of the actual file. This way the minor version and patch level can change without breaking the association.
  • 6. Manage shared libraries Linux systems run on hardware that supports 32-bit and 64-bit executables. Many libraries are thus compiled in 32-bit and 64-bit versions. ldd Output: Viewing required shared libraries 6 64-bit versions are stored under /lib64; 32-bit versions live in the traditional /lib tree. Libraries /lib64/libc-2.11.1.so and /lib/libc-2.11.1.so allow C Progs of 64-bit and 32-bit to run on Linux 64-bit System. To see which libraries an application uses, use command: ldd file_name ~/usr/bin# ldd wget libc.so.6 => /lib/libc.so.6 (0x40020000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) Ex: wget uses libraries libc.so version 6 and ld-linux.so version 2.
  • 7. Manage shared libraries ldd Output: Dependencies between libraries 7 Left hand column indicates what the program would like to be linked to (no path name given), Right hand column shows what the program will actually be linked to (full path and often a symbolic link) ~/usr/bin# ldd /bin/bash libtermcap.so.2 => /lib/libtermcap.so.2 (0x40024000) libdl.so.2 => /lib/libdl.so.2 (0x40028000) libc.so.6 => /lib/libc.so.6 (0x4002b000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) Ex: When programs are loaded into memory, part of loading process is to make sure that relevant shared libraries are loaded when the program loads. A library can require other libraries. Dependencies are normal for large applications. A program may use a graphics library, which can use the X11 library, which in turn uses the C library. ~$ ls -lg /lib/libc.so.6 lrwxrwxrwx 1 root 14 Oct 14 10:47 /lib/libc.so.6 -> libc-2.2.93.so ~$ ls -lg /lib/libc-2.2.93.so -rwxr-xr-x 1 root 1327065 Sep 6 2002 /lib/libc-2.2.93.so bash asked to link to libc.so.6, and it ended up linking to /lib/libc2.2.93.so.
  • 8. Manage shared libraries ldd Output: types of information 8 Ex: In Fedora 12 64-bit system (echidna). ln cmd needs 3 shared libraries: ~$ ldd /bin/ln linux-vdso.so.1 => (0x00007fff644af000) libc.so.6 => /lib64/libc.so.6 (0x00000037eb800000) /lib64/ld-linux-x86-64.so.2 (0x00000037eb400000) 1.(linux-vdso.so.1) is the Linux Virtual Dynamic Shared Object. Necessary logic to allow user programs to access system functions through fastest means available on the processor. Either by interrupt, or for most newer CPUs by fast system call. Types of ldd info: (1) Linux Virtual Dynamic Shared Objects; (2) Pointers; (3) Absolute paths. 2.(libc.so.6) has a pointer to /lib64/libc.so.6. 3.(/lib64/ld-linux-x86-64.so.2) is the absolute path to another library. ~$ ls -l /lib64/libc.so.6 /lib64/ld-linux-x86-64.so.2 lrwxrwxrwx. 1 root root 12 2010-01-14 14:24 /lib64/ld-linux-x86-64.so.2 -> ld-2.11.1.so lrwxrwxrwx. 1 root root 14 2010-01-14 14:24 /lib64/libc.so.6 -> libc-2.11.1.so ls -l cmd shows that last 2 libraries are, in turn, symbolic links to specific versions of the libraries.
  • 9. Manage shared libraries Configuring shared libraries 9 If a shared library is installed manually by editing the LIBRARY CONFIGURATION FILE , you must manually inform the system to use the new libraries. (with ldconfig) The LIBRARY CONFIGURATION FILE is in: /etc/ld.so.conf and /etc/ld.so.cache - contains the directories to be searched for shared libraries. /etc/ld.so.conf specifies that all the .conf files from subdirectory ld.so.conf.d should be included. Older systems may have all entries in /etc/ld/so/conf and not include entries from /etc/ld.so.conf.d Ex: ~$ cat /etc/ld.so.conf include ld.so.conf.d/*.conf ~$ ls /etc/ld.so.conf.d/*.conf /etc/ld.so.conf.d/kernel-2.6.31.12-174.2.19.fc12.x86_64.conf /etc/ld.so.conf.d/kernel-2.6.31.12-174.2.22.fc12.x86_64.conf /etc/ld.so.conf.d/kernel-2.6.31.12-174.2.3.fc12.x86_64.conf /etc/ld.so.conf.d/mysql-x86_64.conf /etc/ld.so.conf.d/qt-x86_64.conf /etc/ld.so.conf.d/tix-x86_64.conf /etc/ld.so.conf.d/xulrunner-64.conf
  • 10. Manage shared libraries Configuring shared libraries 10 Command ldconfig Processes ld.so.conf – including the file libraries from the file, and from the trusted directories: /lib and /usr/lib, and creates the ld.so.cache. Ex: ~$ In summary - The ld.so.cache file is created from the ld.so.conf file by using ldconfig. Any time that ld.so.conf file is changed, the cache file needs to be updated - Using ldconfig
  • 11. Manage shared libraries Loading and setting specific libraries paths 11 Applications can be made to load libraries from directories not listed in /etc/ld.so.conf older apps that need specific library, developing versions of shared libraries, running scripts with product-specific shared libraries installed in /opt. If the library is not in the standard path, you can search and add the nonstandard path with: LD_LIBRARY_PATH environment variable. export LD_LIBRARY_PATH=/usr/lib/oldstuff:/opt/IBM/AgentController/lib If there’s more than 1 list of directories to search, separate them by colon. Export LD_LIBRARY_PATH=/usr/newpath LD_PRELOAD: Specifies libraries containing symbols that override symbols in the real libraries. LD_PRELOAD is seldom used except for debugging and compatibility applications (SOCKS proxy support). Add the /usr/newpath to the list of searched directories for libraries. Ex: Ex: