Sometimes you need to intsall a desired software but could not find package name for it, sometimes the application you want to compile has some missing library or shared object files and you could not find those required files or libraries. This tutorial is aimed at finding and installing right software for your need in Arch Linux.
In Arch Linux most of the software are available through AUR and official repositories. To find the required software and files there are several tools available. pkgfile is one such tool. This tool tells you which package owns which file. To install pkgfile in Arch Linux run following command:
$ sudo pacman -S pkgfile
After installing pkgfile on your Arch Linux system you need to download and update the file database using this command:
$ sudo pkgfile –update
Usage of this tool is simple, suppose you want to find a package which includes makepkg command. You simply need to run:
$ pkgfile makepkg
Also you can list the files installed by giving package name ‘file’:
$ pkgfile –list core/file
Command not found hook
Normally when you enter any command which is not installed on your computer it shows an error message.
sh: 1: abiword: not found
pkgfile package ships command not found hook which searches the official repository when you enter unrecognized command. To enable command not found hook on bash add this line to your ~/.bashrc:
If you are using the zsh then add line given below to ~/.zshrc
After that when you run unknown command the output will be:
abiword may be found in the following packages:
extra/abiword 2.8.6-7 usr/bin/abiword
Once you get the required package name it is easy to install it using pacman or packer.