search

What are linux dependency packages

Mar 24, 2023 am 09:28 AM
linuxDependency package

Linux dependency packages refer to "library files". Most dependency packages are library files, including dynamic libraries and static libraries. Linux systems, like other operating systems, are modular in design, that is It is said that functions depend on each other, and some functions require other functions to support them, which can improve the reusability of the code.

What are linux dependency packages

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

What is a dependency package? Why download dependency packages?

Linux systems, like other operating systems, are modular in design, which means that functions depend on each other, and some functions require other functions to support them, which can improve the reusability of the code:

Most of the dependency packages are some library files, including dynamic libraries and static libraries. If the dependency packages of a program are not installed, and only the program itself is installed, it cannot be used.

You can understand it as Like windows library files, such as DLL

For example, if I want to install a certain software, this software depends on a certain development package. This development package contains the environment files for the software to run. This is the dependency relationship.

For another example, let’s say I want to go to Youku to watch videos.

I just need to install flash. Because Youku's player is developed based on flash.

How to query the dependency packages required by the package I want to install?

At this time, you have to use a very common command, that is rpm or yum.

How to query?

1. Query through rpm

[root@testvm02 ~]# rpm -q ghostscript   #查看对应的rpm包.
ghostscript-8.70-19.el6.x86_64
[root@testvm02 ~]# rpm -qR ghostscript  #R的意思就是requires就是依赖哪些软件包.
/bin/sh  
/sbin/ldconfig  
/sbin/ldconfig  
config(ghostscript) = 8.70-19.el6
ghostscript-fonts  
libICE.so.6()(64bit)  
libSM.so.6()(64bit)  
libX11.so.6()(64bit)  
libXext.so.6()(64bit)  
libXt.so.6()(64bit)  
libc.so.6()(64bit)  
libc.so.6(GLIBC_2.11)(64bit)  
libc.so.6(GLIBC_2.2.5)(64bit)  
libc.so.6(GLIBC_2.3)(64bit)  
libc.so.6(GLIBC_2.3.4)(64bit)  
libc.so.6(GLIBC_2.4)(64bit)  
libc.so.6(GLIBC_2.7)(64bit)  
libcairo.so.2()(64bit)  
libcom_err.so.2()(64bit)  
libcrypt.so.1()(64bit)  
libcups.so.2()(64bit)  
libcupsimage.so.2()(64bit)  
libdl.so.2()(64bit)  
libdl.so.2(GLIBC_2.2.5)(64bit)  
libfontconfig.so.1()(64bit)  
libgs.so.8()(64bit)  
libgssapi_krb5.so.2()(64bit)

Note: The above query is the dependent software package.

2. Query the dependent program through yum

[root@testvm02 ~]# yum deplist ghostscript
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Finding dependencies: 
package: ghostscript.i686 8.70-19.el6
  dependency: libc.so.6(GLIBC_2.11)       #依赖的库或者程序
   provider: glibc.i686 2.12-1.149.el6    #这个库是通过哪个rpm包安装的.
  dependency: libXext.so.6
   provider: libXext.i686 1.3.2-2.1.el6
  dependency: libpng12.so.0
   provider: libpng.i686 2:1.2.49-1.el6_2
  dependency: libpng12.so.0(PNG12_0)
   provider: libpng.i686 2:1.2.49-1.el6_2
  dependency: libpthread.so.0(GLIBC_2.1)
   provider: glibc.i686 2.12-1.149.el6
  dependency: libdl.so.2
   provider: glibc.i686 2.12-1.149.el6

3. Check which software this software depends on (that is, if I want to delete it, which software will have an impact on the operation)

[root@testvm02 ~]# rpm -q nfs-utils         #查看这个软件是否安装.
nfs-utils-1.2.3-54.el6.x86_64
[root@testvm02 ~]# rpm -e --test nfs-utils  #通过--test进行测试删除,查看是否有依赖关系,如果有会阻止删除.测试是否能够删除.
error: Failed dependencies:
    nfs-utils >= 1.2.1-11 is needed by (installed) nfs-utils-lib-1.1.5-9.el6.x86_64  #有其他的软件包依赖这个软件包,如果删除可能对这个程序有影响.
[root@testvm02 ~]# rpm -e --test nfs-utils
error: Failed dependencies:
    nfs-utils >= 1.2.1-11 is needed by (installed) nfs-utils-lib-1.1.5-9.el6.x86_64
[root@testvm02 ~]# rpm -e --test gcc  #测试删除gcc,没有报错,也就是没有别的地方依赖它,可以进行删除.
[root@testvm02 ~]# rpm -q gcc         #上面的--test并没有真正删除
gcc-4.4.7-11.el6.x86_64
[root@testvm02 ~]# rpm -e gcc         #不带--test参数,进行真正的删除.
[root@testvm02 ~]# rpm -q gcc         #再次查询没有这个gcc已经被删除掉了.
package gcc is not installed

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What are linux dependency packages. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Maintenance Mode in Linux: When and Why to Use ItMaintenance Mode in Linux: When and Why to Use ItApr 25, 2025 am 12:15 AM

The timing and reasons for using Linux maintenance mode: 1) When the system starts up, 2) When performing major system updates or upgrades, 3) When performing file system maintenance. Maintenance mode provides a safe and controlled environment, ensuring operational safety and efficiency, reducing impact on users, and enhancing system security.

Linux: Essential Commands and OperationsLinux: Essential Commands and OperationsApr 24, 2025 am 12:20 AM

Indispensable commands in Linux include: 1.ls: list directory contents; 2.cd: change working directory; 3.mkdir: create a new directory; 4.rm: delete file or directory; 5.cp: copy file or directory; 6.mv: move or rename file or directory. These commands help users manage files and systems efficiently by interacting with the kernel.

Linux Operations: Managing Files, Directories, and PermissionsLinux Operations: Managing Files, Directories, and PermissionsApr 23, 2025 am 12:19 AM

In Linux, file and directory management uses ls, cd, mkdir, rm, cp, mv commands, and permission management uses chmod, chown, and chgrp commands. 1. File and directory management commands such as ls-l list detailed information, mkdir-p recursively create directories. 2. Permission management commands such as chmod755file set file permissions, chownuserfile changes file owner, and chgrpgroupfile changes file group. These commands are based on file system structure and user and group systems, and operate and control through system calls and metadata.

What is Maintenance Mode in Linux? ExplainedWhat is Maintenance Mode in Linux? ExplainedApr 22, 2025 am 12:06 AM

MaintenanceModeinLinuxisaspecialbootenvironmentforcriticalsystemmaintenancetasks.Itallowsadministratorstoperformtaskslikeresettingpasswords,repairingfilesystems,andrecoveringfrombootfailuresinaminimalenvironment.ToenterMaintenanceMode,interrupttheboo

Linux: A Deep Dive into Its Fundamental PartsLinux: A Deep Dive into Its Fundamental PartsApr 21, 2025 am 12:03 AM

The core components of Linux include kernel, file system, shell, user and kernel space, device drivers, and performance optimization and best practices. 1) The kernel is the core of the system, managing hardware, memory and processes. 2) The file system organizes data and supports multiple types such as ext4, Btrfs and XFS. 3) Shell is the command center for users to interact with the system and supports scripting. 4) Separate user space from kernel space to ensure system stability. 5) The device driver connects the hardware to the operating system. 6) Performance optimization includes tuning system configuration and following best practices.

Linux Architecture: Unveiling the 5 Basic ComponentsLinux Architecture: Unveiling the 5 Basic ComponentsApr 20, 2025 am 12:04 AM

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

Linux Operations: Utilizing the Maintenance ModeLinux Operations: Utilizing the Maintenance ModeApr 19, 2025 am 12:08 AM

Linux maintenance mode can be entered through the GRUB menu. The specific steps are: 1) Select the kernel in the GRUB menu and press 'e' to edit, 2) Add 'single' or '1' at the end of the 'linux' line, 3) Press Ctrl X to start. Maintenance mode provides a secure environment for tasks such as system repair, password reset and system upgrade.

Linux: How to Enter Recovery Mode (and Maintenance)Linux: How to Enter Recovery Mode (and Maintenance)Apr 18, 2025 am 12:05 AM

The steps to enter Linux recovery mode are: 1. Restart the system and press the specific key to enter the GRUB menu; 2. Select the option with (recoverymode); 3. Select the operation in the recovery mode menu, such as fsck or root. Recovery mode allows you to start the system in single-user mode, perform file system checks and repairs, edit configuration files, and other operations to help solve system problems.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)