- libpcre
- liblzma
$ sudo yum install -y pcre-devel
$ sudo yum install xz-devel
$ cd /usr/local/src
$ sudo git clone https://github.com/ggreer/the_silver_searcher.git
$ cd the_silver_searcher
$ sudo ./build.sh
$ sudo make install
$ which ag
/usr/local/bin/ag
Note: @manjeetbhatia 's comment is the right answer. No reason to manually build it when it's in the repo.
sudo yum install the_silver_searcher