Skip to content

Instantly share code, notes, and snippets.

@rkaneko
Last active November 7, 2022 16:57
Show Gist options
  • Star 31 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save rkaneko/988c3964a3177eb69b75 to your computer and use it in GitHub Desktop.
Save rkaneko/988c3964a3177eb69b75 to your computer and use it in GitHub Desktop.
Installing ag: the silver searcher on CentOS.

Installing ag on CentOS

Prerequistes

  • libpcre
  • liblzma

Download, build and install

$ 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
@arnisjuraga
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