Skip to main content
38 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
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
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

Disable the public key check for rpm installation

For legacy RPM Linux without yum use: rpm -i --nosignature
Stuart Cardall's user avatar
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

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
  • 251
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.8k
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

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
12 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
  • 121
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
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

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,075
6 votes

Where to store VCS version in RPM?

RPM actually has a poorly documented VCS tag. It doesn't appear to have any sort of guidelines on its use, but it exists and is supported. cat > test.spec <<'__END__' Name: foo Version: 1 ...
Craig Ringer's user avatar
  • 11.3k
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

tell yum to ignore a single dependency

It sounds like you're trying to install package that has not been designed for the OS, i.e. if it was designed for CentOS it would require nx correctly. Another workaround for the problem is to ...
bodgit's user avatar
  • 4,791
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
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
6 votes
Accepted

rpm: how to disable debuginfo

TL;DR: Add the following line to your specfile: %global debug_package %{nil} You didn't mention what OS this is, but my experience is that debuginfo is generated automatically for binary packages, ...
chutz's user avatar
  • 8,090
5 votes

Mark rpm package as automatically installed

With DNF To unmark a package as user installed (ie. the package will be removed by autoremove if it is not a dependency of a user installed package): dnf mark remove [package name or wildcard] ...
burneddi's user avatar
  • 151
5 votes

Download RPM packages for command which is already installed

You can use the repotrack command from the yum-utils package. It will download the entire dependency tree - even if it is already installed. Example: sudo yum install yum-utils # Install yum-...
Sami Badra's user avatar

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