在CentOS上安装ack-grep

nov*_*ovo 11 centos ack

我经历了大量的谷歌搜索,在CentOS上安装了ack-grep,但我没有找到任何帮助.我也查找了源代码,但也找不到它.有谁知道如何在操作系统上安装它?

非常感谢.

lut*_*act 13

如果您没有root权限,则可以执行以下操作:

$ curl https://beyondgrep.com/ack-2.22-single-file > ~/bin/ack && chmod 0755 !#:3
Run Code Online (Sandbox Code Playgroud)

或者您可以更改为root用户:

$ sudo su
# curl https://beyondgrep.com/ack-2.22-single-file > /bin/ack && chmod 0755 !#:3
Run Code Online (Sandbox Code Playgroud)

  • 请务必查看http://beyondgrep.com/install/以获取最新/最好的版本.上述解决方案硬编码为特定版本. (8认同)

bra*_*rry 9

您可以从EPEL软件存储库中获取它.

来自EPEL FAQ:

对于EL5:

su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
...
su -c 'yum install ack'
Run Code Online (Sandbox Code Playgroud)

对于EL6:

su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
...
su -c 'yum install ack'
Run Code Online (Sandbox Code Playgroud)


lkr*_*aav 8

可能与/sf/answers/1620850521/基本相同,但在CentOS 6.7上,答案是:

# yum install epel-release
# yum install ack
Run Code Online (Sandbox Code Playgroud)