37 votes
Accepted

What's the difference between `yum install <local path>` and `yum localinstall <local path>`

In RHEL 5 and previous versions, yum install only accepted package names from enabled repositories, and did not accept paths to local RPMs; you had to use yum localinstall to install these. In RHEL 6 ...
Michael Hampton's user avatar
23 votes

Install rpm package using Ansible

Actually the yum module can install an RPM directly from a given URL: - name: Remote RPM install with yum yum: name=http://example.com/some_package.rpm
Frederico Martins's user avatar
22 votes
Accepted

What does the "1:" before the package name mean in yum.log

1 is the RPM epoch number. It overrides the normal comparison order on version checking. So, if there is some odd reason why you as a packager want to mark a lower version number as an upgrade, you ...
richardb's user avatar
  • 1,256
19 votes

Do I need a RHEL subscription to install packages?

An alternative is to add the CentOS repository to your yum configs. CentOS is in large part a derivative of RHEL. As such, most of its packages are compatible with RHEL. Michael Cutler wrote a guide ...
Illya Moskvin's user avatar
18 votes

Can one require "this OR that" package in an RPM spec file?

This is now possible as of RPM 4.13. https://rpm-software-management.github.io/rpm/manual/boolean_dependencies.html It can be just simple as: Requires: (pkgA >= 3.2 or pkgB)
carlwgeorge's user avatar
17 votes
Accepted

Disable SSL check rpm

What you would need to do is: wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm If you still get an SSL warning try: wget --no-check-certificate https://dl.fedoraproject....
Joe Morgan's user avatar
17 votes

How did installing this RPM create a file?

# rpm -qp --scripts getpagespeed-extras-release-7-1.el7.gps.noarch.rpm warning: getpagespeed-extras-release-7-1.el7.gps.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 222b0e83: NOKEY postinstall ...
Pascal's user avatar
  • 503
16 votes

Download RPM packages for command which is already installed

It is possible to download the packages of an RPM which is already installed using the --downloadonly switch. I am not sure why yum doesn't check this setting before checking whether the package is ...
JohnEye's user avatar
  • 409
16 votes

How did installing this RPM create a file?

You discovered the rpm's scripts run a script from the Internet, and that script currently redirects to what might be malware. Although, I'm not finding much of a payload that does anything. rpm ...
John Mahowald's user avatar
15 votes

Disable the public key check for rpm installation

For legacy RPM Linux without yum use: rpm -i --nosignature
Stuart Cardall's user avatar
14 votes

yum error in PREUN scriptlet when removing packages

I did a rpm -ql <packagename> to see the package original contents. manually deleted any left over file. ran yum with the noscripts flag as described above, so the script doesn't fail. yum --...
Zenin's user avatar
  • 241
13 votes

Build RPM using source directory, not tarball

This question is a bit old, but in case other people find it in search there is a more correct way to do this that does also allow the creation of an SRPM. In the prep section, instead of using the ...
tdimmig's user avatar
  • 283
13 votes
Accepted

Installing Postgres server 9.6 on Amazon Linux

You have installed the repository that makes PostgreSQL packages available (check /etc/yum.repos.d). Now you can do yum update and actually install the DB with yum install postgresql96-server.
Sven's user avatar
  • 99.5k
13 votes
Accepted

yum/rpm Failed to initialize NSS library in chroot

Special thank you to TrevorH and jhodrien on #centos. The problem was that chroot prevents access to /dev/urandom (as desgined). The update installed to succeeded required those random bits to ...
Arlion's user avatar
  • 628
12 votes
Accepted

Difference between rpm -ivh <package> and yum install <package>

For rpm you must specify where to get the file with the new version of the package. yum, which is a more intelligent management system, try to find a new version of the package in their repositories, ...
Slipeer's user avatar
  • 3,313
11 votes

Solving multilib version problems

I've hit this after interrupting yum update (during an ansible run in my case). After reading this thread I eventually fixed it with: package-cleanup --cleandupes Though before that I'd also tried ...
Hamish Downer's user avatar
10 votes

yum list available - not showing all packages

If the package is installed, it will not show up as available. You can specify the --showduplicates option to see everything that is available in a repo whether it is installed or not. I would ...
Stephen's user avatar
  • 101
9 votes
Accepted

searching for installed rpms by vendor

You can show packages by vendor using a query format. I'd consider something like this, to list all packages: rpm -qa --queryformat '%{vendor}:%{name}\n' | sort > packages.txt You can then ...
Michael Hampton's user avatar
8 votes
Accepted

Why are some RPM's "not relocatable"?

In fact, most RPM packages you will find are not relocatable. The Fedora Packaging Guidelines have this to say: The use of RPM's facility for generating relocatable packages is strongly ...
Michael Hampton's user avatar
8 votes
Accepted

Trouble removing package using Yum on CentOS7

The package isn't installed at all. yum list lists all available packages, whether installed or not. To show only installed packages, use yum list installed. yum list installed | grep boto
Michael Hampton's user avatar
7 votes

Do .rpm files have metadata

I've forked @Ignacio answer and created oneliner to quickly go over all tags: rpm -qp package.rpm --qf "$(rpm --querytags | sed -nr 's/(.*)/\1:%{\1}/p' | tr '[:space:]' '\n')"
alkuzad's user avatar
  • 171
7 votes

Install rpm package using Ansible

Here's what I do to install multiple RPMs from the source machine: - name: mkdir /tmp/RPMS file: path=/tmp/RPMS state=directory - name: copy RPMs to /tmp/RPMS copy: src: "{{ item }}" ...
Jim Hunziker's user avatar
  • 1,862
7 votes
Accepted

Installing rpm-package to systemd?

each rpm specifies a list of files and directories that it installs. Two rpms cannot install the same files or directories. In your spec file (or whatever file you use to describe the rpm you build) ...
Chris Maes's user avatar
7 votes
Accepted

yum install local rpm throws error if up to date

on my system (centos6, centos7) "yum localinstall" will return code 0 even with "Error: Nothing to do" message, while "yum install" returns 1. sudo yum localinstall packages/* -y --disablerepo=* ...
tonioc's user avatar
  • 1,065
6 votes
Accepted

Incremental RPM package version "numbers" for x.y.z > x.y.z-beta (or alpha, rc, etc)

The official rpm guidelines tell how to do this, and links to an examples page. Here is an example of how you would work with the very common versioning scheme that uses three levels of pre-release (...
stochastic's user avatar
6 votes

How to list RPM dependencies?

People have already responded with: rpm -q --requires PKG yum -q deplist PKG Yes, either rpm or yum works and correctly answers the question. The main difference between rpm and yum is that yum ...
Suave-V's user avatar
  • 61
6 votes

Upgrade cURL to latest on CentOS 5.8

Running yum update <package> is generally speaking safe. Since the most recent Erratum for cURL is RHSA-2013-0983 from 2013 I don't expect that yum upgrade curl will actually do anything at all ...
HBruijn's user avatar
  • 80.3k
6 votes
Accepted

How to ensure integrity and security enforcing signed unmodified RPM package?

This turns out to be quite a difficult problem, if you limit yourself to the single system which you're trying to validate. Fortunately, we live in the real world, where there is more than one ...
Michael Hampton's user avatar
6 votes
Accepted

How to make my RPM abort install based on outcome of %pre scriptlet

Exiting nonzero in the scriptlet will certainly abort the installation of the pacakge, but this does have side effects. The doc you linked to also discusses the implications of having your scriptlet ...
Michael Hampton's user avatar
6 votes
Accepted

Oracle Linux 8.3 can't find libyaml-devel

You need to enable "PowerTools" repository equivalent. For Oracle Linux 8: sudo dnf config-manager --set-enabled ol8_codeready_builder
Danila Vershinin's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible