Requirements Description:
Today check the host of a software Ghostscript, ready to delete, first look at the software depends on which software,
And what software depends on it?
Operation Process :
1. See what software This software depends on (RPM query)
[Email protected] ~]# rpm-q Ghostscript#查看对应的rpm包.
Ghostscript-8.70-19.el6.x86_64
[Email protected] ~]# 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)
Libjasper.so.1 () (64bit)
libjpeg.so.62 () (64bit)
libjpeg.so.62 (libjpeg_6.2) (64bit)
Libk5crypto.so.3 () (64bit)
Libkrb5.so.3 () (64bit)
Libm.so.6 () (64bit)
Libm.so.6 (glibc_2.2.5) (64bit)
libpng12.so.0 () (64bit)
libpng12.so.0 (PNG12_0) (64bit)
libpthread.so.0 () (64bit)
libpthread.so.0 (glibc_2.2.5) (64bit)
libpthread.so.0 (glibc_2.3.2) (64bit)
Libstdc++.so.6 () (64bit)
Libz.so.1 () (64bit)
Rpmlib (compressedfilenames) <= 3.0.4-1
Rpmlib (filedigests) <= 4.6.0-1
Rpmlib (payloadfileshaveprefix) <= 4.0-1
Rtld (Gnu_hash)
Urw-fonts >= 1.1
Rpmlib (PAYLOADISXZ) <= 5.2-1
Note: The above query is a dependent package.
2. Use Yum to query for dependent programs
[email protected] ~]# YumdeplistGhostscript
Loaded Plugins:product-id, Subscription-manager
This system isn't registered to Red Hat Subscription Management. You can use the 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
Dependency:/sbin/ldconfig
Provider:glibc.x86_64 2.12-1.149.el6
provider:glibc.i686 2.12-1.149.el6
Dependency:libkrb5.so.3
provider:krb5-libs.i686 1.10.3-33.el6
Dependency:libdl.so.2 (glibc_2.0)
provider:glibc.i686 2.12-1.149.el6
Dependency:libfontconfig.so.1
provider:fontconfig.i686 2.8.0-5.el6
Dependency:libcrypt.so.1
provider:glibc.i686 2.12-1.149.el6
Dependency:libice.so.6
provider:libICE.i686 1.0.6-1.el6
Dependency:libsm.so.6
provider:libSM.i686 1.2.1-2.el6
dependency:libpthread.so.0 (glibc_2.0)
provider:glibc.i686 2.12-1.149.el6
Dependency:libcairo.so.2
provider:cairo.i686 1.8.8-3.1.el6
Dependency:libcupsimage.so.2
provider:cups-libs.i686 1:1.4.2-67.el6
dependency:libjpeg.so.62
provider:libjpeg-turbo.i686 1.2.1-3.el6_5
Dependency:libjasper.so.1
provider:jasper-libs.i686 1.900.1-15.el6_1.1
Dependency:libz.so.1
provider:zlib.i686 1.2.3-29.el6
Dependency:libstdc++.so.6
provider:libstdc++.i686 4.4.7-11.el6
Dependency:libm.so.6
provider:glibc.i686 2.12-1.149.el6
Dependency:rtld (Gnu_hash)
provider:glibc.i686 2.12-1.149.el6
Provider:glibc.x86_64 2.12-1.149.el6
Dependency:ghostscript-fonts
Provider:ghostscript-fonts.noarch 5.50-23.2.el6
dependency:libjpeg.so.62 (libjpeg_6.2)
provider:libjpeg-turbo.i686 1.2.1-3.el6_5
Dependency:libcom_err.so.2
provider:libcom_err.i686 1.41.12-21.el6
Dependency:urw-fonts >= 1.1
Provider:urw-fonts.noarch 2.4-10.el6
Dependency:/bin/sh
Provider:bash.x86_64 4.1.2-29.el6
Dependency:libdl.so.2 (glibc_2.1)
provider:glibc.i686 2.12-1.149.el6
Dependency:libxt.so.6
provider:libXt.i686 1.1.4-6.1.el6
Dependency:libx11.so.6
provider:libX11.i686 1.6.0-2.2.el6
dependency:libpthread.so.0 (glibc_2.3.2)
provider:glibc.i686 2.12-1.149.el6
dependency:libpthread.so.0
provider:glibc.i686 2.12-1.149.el6
Dependency:libm.so.6 (glibc_2.0)
provider:glibc.i686 2.12-1.149.el6
Dependency:libgssapi_krb5.so.2
provider:krb5-libs.i686 1.10.3-33.el6
Dependency:libcups.so.2
provider:cups-libs.i686 1:1.4.2-67.el6
Dependency:libk5crypto.so.3
provider:krb5-libs.i686 1.10.3-33.el6
Package:ghostscript.x86_64 8.70-19.el6
Dependency:libcairo.so.2 () (64bit)
Provider:cairo.x86_64 1.8.8-3.1.el6
Dependency:libstdc++.so.6 () (64bit)
Provider:libstdc++.x86_64 4.4.7-11.el6
Dependency:libz.so.1 () (64bit)
Provider:zlib.x86_64 1.2.3-29.el6
Dependency:libcupsimage.so.2 () (64bit)
Provider:cups-libs.x86_64 1:1.4.2-67.el6
Dependency:/sbin/ldconfig
Provider:glibc.x86_64 2.12-1.149.el6
provider:glibc.i686 2.12-1.149.el6
Dependency:libcrypt.so.1 () (64bit)
Provider:glibc.x86_64 2.12-1.149.el6
Dependency:urw-fonts >= 1.1
Provider:urw-fonts.noarch 2.4-10.el6
Dependency:libm.so.6 (glibc_2.2.5) (64bit)
Provider:glibc.x86_64 2.12-1.149.el6
Dependency:/bin/sh
Provider:bash.x86_64 4.1.2-29.el6
Dependency:libx11.so.6 () (64bit)
Provider:libX11.x86_64 1.6.0-2.2.el6
dependency:libpng12.so.0 (PNG12_0) (64bit)
Provider:libpng.x86_64 2:1.2.49-1.el6_2
Dependency:libk5crypto.so.3 () (64bit)
Provider:krb5-libs.x86_64 1.10.3-33.el6
Dependency:libm.so.6 () (64bit)
Provider:glibc.x86_64 2.12-1.149.el6
dependency:libjpeg.so.62 (libjpeg_6.2) (64bit)
Provider:libjpeg-turbo.x86_64 1.2.1-3.el6_5
Dependency:libxt.so.6 () (64bit)
Provider:libXt.x86_64 1.1.4-6.1.el6
dependency:libpng12.so.0 () (64bit)
Provider:libpng.x86_64 2:1.2.49-1.el6_2
dependency:libpthread.so.0 (glibc_2.3.2) (64bit)
Provider:glibc.x86_64 2.12-1.149.el6
Dependency:libfontconfig.so.1 () (64bit)
Provider:fontconfig.x86_64 2.8.0-5.el6
Dependency:libdl.so.2 () (64bit)
Provider:glibc.x86_64 2.12-1.149.el6
Dependency:libice.so.6 () (64bit)
Provider:libICE.x86_64 1.0.6-1.el6
Dependency:libkrb5.so.3 () (64bit)
Provider:krb5-libs.x86_64 1.10.3-33.el6
Dependency:libcom_err.so.2 () (64bit)
Provider:libcom_err.x86_64 1.41.12-21.el6
Dependency:libxext.so.6 () (64bit)
Provider:libXext.x86_64 1.3.2-2.1.el6
Dependency:libdl.so.2 (glibc_2.2.5) (64bit)
Provider:glibc.x86_64 2.12-1.149.el6
Dependency:ghostscript-fonts
Provider:ghostscript-fonts.noarch 5.50-23.2.el6
Dependency:rtld (Gnu_hash)
provider:glibc.i686 2.12-1.149.el6
Provider:glibc.x86_64 2.12-1.149.el6
Dependency:libcups.so.2 () (64bit)
Provider:cups-libs.x86_64 1:1.4.2-67.el6
Dependency:libc.so.6 (glibc_2.11) (64bit)
Provider:glibc.x86_64 2.12-1.149.el6
dependency:libpthread.so.0 () (64bit)
Provider:glibc.x86_64 2.12-1.149.el6
Dependency:libgssapi_krb5.so.2 () (64bit)
Provider:krb5-libs.x86_64 1.10.3-33.el6
dependency:libpthread.so.0 (glibc_2.2.5) (64bit)
Provider:glibc.x86_64 2.12-1.149.el6
Dependency:libsm.so.6 () (64bit)
Provider:libSM.x86_64 1.2.1-2.el6
dependency:libjpeg.so.62 () (64bit)
Provider:libjpeg-turbo.x86_64 1.2.1-3.el6_5
Dependency:libjasper.so.1 () (64bit)
Provider:jasper-libs.x86_64 1.900.1-15.el6_1.1
3. Check which software is dependent on the software (i.e. what software will be affected if I want to remove it)
[Email protected] ~]# rpm-q nfs-utils #查看这个软件是否安装. NFS-utils-1.2.3- Wu. El6.x86_64[[email protected]~]# rpm-e--test nfs-utils #通过--test to test the deletion to see if there is a dependency and if there are any that will prevent the deletion. The test can be deleted. error:failed Dependencies:nfs-utils >=1.2.1- Oneis needed by (installed) nfs-utils-lib-1.1.5-9. el6.x86_64 #有其他的软件包依赖这个软件包 If the removal may have an impact on this program.[[Email protected]~]# rpm-e--test nfs-utilserror:failed Dependencies:nfs-utils >=1.2.1- Oneis needed by (installed) nfs-utils-lib-1.1.5-9. El6.x86_64[[email protected]~]# rpm-e--testgcc #测试删除gcc, there is no error, that is, there is no other place to rely on it, can be deleted.[[Email protected]~]# Rpm-qgcc #上面的--test did not really deleteGCC-4.4.7- One. el6.x86_64
[Email protected] ~]# rpm-e gcc#不带 The--test parameter for real deletion.
[Email protected] ~]# rpm-q gcc#再次查询没有这个gcc已经被删除掉了.
Package GCC are not installed
Document creation time: August 23, 2018 12:32:05
In a Linux environment, how do you see which packages are dependent on which package?