I'm looking for a package that provides a specific binary, so I can install it. how can I search to find out what packages provide this binary? (note: I know there's at least one tool that does this, but I have forgotten its name.)
Since pacman 5.0, there is built-in functionality for searching the database with the
-F option. First update the database:
sudo pacman -Fy
Then you can see which package contains
pacman -Fs $filename
pacman -Fos $path
to search for a complete path.
Since you knew you were looking for an equivalent of
apt-file, you could have looked it up in the Pacman Rosetta.
Alternatively, you can use pkgfile. Install it with
pacman -S pkgfile, then run
sudo pkgfile -u
to update the database. To see what package contains
the google way:
and in case it is in AUR instead of an official package: