Skip to content

Instantly share code, notes, and snippets.

Last active November 7, 2022 16:57
  • Star 31 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Installing ag: the silver searcher on CentOS.

Installing ag on CentOS


  • libpcre
  • liblzma

Download, build and install

$ sudo yum install -y pcre-devel

$ sudo yum install xz-devel

$ cd /usr/local/src

$ sudo git clone

$ cd the_silver_searcher

$ sudo ./

$ sudo make install

$ which ag
Copy link

dhull commented Feb 27, 2020

On CentOS 8, you can also build an RPM using the CentOS 7 SRPM. Something like the following worked for me.

curl -O
yum install -y rpm-build xz-devel bash-completion
rpmbuild --rebuild the_silver_searcher-2.1.0-1.el7.src.rpm
sudo yum install $HOME/rpmbuild/RPMS/x86_64/the_silver_searcher-2.1.0-1.el8.x86_64.rpm

Copy link

subchen commented May 9, 2020

Copy link

If you get:

src/zfile.c:63:9: error: unknown type name ‘z_stream’
         z_stream gz;

you have additional dependency missing:

yum install -y zlib-devel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment