Every once in a while I find myself trying to install something, but not knowing what package contains it.
# yum install g++ Setting up Install Process No package g++ available. Error: Nothing to do
But if you’re using a modern version of yum (i.e. that of RHEL 6 or Fedora) then you can simply tell it to install the program you’re looking for.
# yum install /usr/bin/g++ Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package gcc-c++.x86_64 0:4.4.6-3.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved
25 May 2012 at 10:34
If you just want to look and see what contains the file, you could always do:
# yum whatprovides /usr/bin/g++
27 May 2012 at 17:35
Or repoquery -f /usr/bin/g++, which looks for files specifically.
19 Jun 2012 at 12:14
hi, i’m looking for similar functionality as dpkg (ie scanning paths for packages and then they became available via apt-get) in yum or rpm. so far i’m only creating local repo with createrepo, but as times goes by and my package collection gets bigger, it’s hard to maintain. i’m a fedora n00b, please enlighten me.
19 Jun 2012 at 13:10
The yum team have a useful tutorial for managing repos of your own here: http://yum.baseurl.org/wiki/RepoCreate