Showing posts with label RPM. Show all posts
Showing posts with label RPM. Show all posts

Tuesday, January 26, 2016

Listing more information on an rpm file

1. List the RPM to which a file belongs
# rpm -qa |grep  gcc
gcc-4.4.7-16.el6.x86_64
gcc-gnat-4.4.7-16.el6.x86_64
gcc-objc++-4.4.7-16.el6.x86_64
libgcc-4.4.7-16.el6.x86_64
gcc-c++-4.4.7-16.el6.x86_64
gcc-gfortran-4.4.7-16.el6.x86_64
gcc-java-4.4.7-16.el6.x86_64
gcc-objc-4.4.7-16.el6.x86_64

2. List all files from an installed package:
# rpm -qpl rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
/etc/apt
/etc/apt/sources.list.d
/etc/apt/sources.list.d/rpmforge-extras.list
/etc/apt/sources.list.d/rpmforge-testing.list
/etc/apt/sources.list.d/rpmforge.list
/etc/pki/rpm-gpg
/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-fabian
/etc/smart
/etc/smart/channels
.....
.....

 List of dependent RPMs for a specific RPM package
# rpm -qaR htop
libc.so.6()(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)
libm.so.6()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libncursesw.so.5()(64bit)
libtinfo.so.5()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
rpmlib(PayloadIsXz) <= 5.2-1

Monday, March 21, 2011

Resolving "specifies multiple packages" error when removing a package

You may be using the good old rpm -e to remove a package, you may encounter an error, in my case "blas specified multiple packages". Naturally rpm will not allow you to remove the package.

# rpm -e --nodeps --allmatches (package)

Monday, June 21, 2010

Rpmbuild Tutorial

RPMBuild is used to build both binary and source packages that can be used with the rpm commands.

There are a few good resources
  1. Rpmbuild Tutorial is a detailed well-written tutorial on rpmbuild utilities.
  2. RPM.org User Documentation is also another good material to read on.
  3. RPM Guild an excellent document that covers all aspects of the Red Hat Package Management system

Tuesday, May 11, 2010

Tips on RPM (Part 1)

Read up on some good tips on  RHEL / Fedora RPM from Linux Format magazine. thought I list it down to use it in the future.
  1. To list a specific package, you use
    rpm -qa|grep (package)
  2. To find out what package a file came from
    rpm -qf /usr/sbin/sshd
  3. To show details of a not-yet-installed package
    rpm -qip Singular-release.rpm
  4. Find out what the package depends on
    rpm -qR openssh-server
  5. Show the files contained in an installed package
    rpm -qi openssh-server