How do I find which rpm package supplies a file I’m looking for?

This is an old question, but the current answers are incorrect 🙂 Use yum whatprovides, with the absolute path to the file you want (which may be wildcarded). For example: yum whatprovides ‘*bin/grep’ Returns grep-2.5.1-55.el5.x86_64 : The GNU versions of grep pattern matching utilities. Repo : base Matched from: Filename : /bin/grep You may prefer … Read more

How to install latest version of git on CentOS 8.x/7.x/6.x

You can use WANDisco’s CentOS repository to install Git 2.x: for CentOS 6, for CentOS 7 Install WANDisco repo package: yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm – or – yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpm – or – yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm Install the latest version of Git 2.x: yum install git Verify the version of Git that was installed: git –version … Read more

How to yum install Node.JS on Amazon Linux

Stumbled onto this, was strangely hard to find again later. Putting here for posterity: sudo yum install nodejs npm –enablerepo=epel EDIT 3: As of July 2016, EDIT 1 no longer works for nodejs 4 (and EDIT 2 neither). This answer (https://stackoverflow.com/a/35165401/78935) gives a true one-liner. EDIT 1: If you’re looking for nodejs 4, please try … Read more

How to list the contents of a package using YUM?

There is a package called yum-utils that builds on YUM and contains a tool called repoquery that can do this. $ repoquery –help | grep -E “list\ files” -l, –list list files in this package/group Combined into one example: $ repoquery -l time /usr/bin/time /usr/share/doc/time-1.7 /usr/share/doc/time-1.7/COPYING /usr/share/doc/time-1.7/NEWS /usr/share/doc/time-1.7/README /usr/share/info/time.info.gz On at least one RH system, … Read more