Skip to content

Instantly share code, notes, and snippets.

@rkaneko
Last active January 26, 2026 17:48
Show Gist options
  • Select an option

  • Save rkaneko/988c3964a3177eb69b75 to your computer and use it in GitHub Desktop.

Select an option

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
@domq
Copy link

domq commented Jan 26, 2026

@domq
Copy link

domq commented Jan 26, 2026

Centos 9 du jour:

rpm -ivh https://rpmfind.net/linux/centos-stream/9-stream/BaseOS/x86_64/os/Packages/pcre-8.44-4.el9.x86_64.rpm \
  https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/t/the_silver_searcher-2.2.0%5E2020704.5a1c8d8-3.el9.x86_64.rpm

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