Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Currently I'm using ack-grep 1.92. Now I want to use ack-grep 2.+.

Official documentation says that I can install ack-grep 2.0 with apt-get, but when I try to install, it says it's already the newest version.

I also tried install it with a specified version like:

sudo apt-get install ack-grep 2.10

It installs something, but ack-grep is still 1.92.

How can I install the newest version?

share|improve this question
    
Your frustration about packages being slightly out of day is common. I apologize if beyondgrep.com/install makes it sound like it's saying anything about what version is available in any given package manager. Above the package list, that page says "Please note that the maintainers of ack have nothing to do with these packages. If a given package is out of date or doesn't work, you'll need to work with the packagers, not the ack team." Is there something I could do on the page that would make it clearer that packaging is out of my hands? –  Andy Lester Oct 9 '13 at 13:49
    
@AndyLester Thanks for a kind reply. My misunderstanding is caused by my lack of knowledge of Ubuntu packages and my careless reading. I think it would be good to put some links about "how to install" like this page.:) –  Sangdol Oct 9 '13 at 16:20
1  
Important to read askubuntu.com/questions/151283/… –  Braiam Oct 15 '13 at 14:24

4 Answers 4

up vote 4 down vote accepted

You can't install yet ack-grep 2.10 using apt-get because ack-grep 2.10 is not yet included in Ubuntu repositories. To see what versions are available in repositories, you can use the following command:

apt-cache showpkg ack-grep

But you can install by downloading it from here:

It's a deb file, so you can be interested also by:

share|improve this answer
2  
You can install current version of ack by executing: curl http://beyondgrep.com/ack-2.12-single-file > /usr/bin/ack && chmod 0755 !#:3 –  user2041318 Feb 19 at 11:32

You don't have to wait for saucy (Ubuntu 13.10) to be released to use its version of ack-grep. You can install just one package, and its unmet dependencies, from a future release with the right apt-pinning preferences.

See these examples:

Install packages from newer release without building (apt pinning)

Install a single specific package from future distribution

share|improve this answer

If you are using Ubuntu 13.10, then you can install ack-grep 2.04.2 using the Ubuntu Software Center. The ack-grep package is from the universe repository.

To give an example of what ack-grep can do, here is a command to display just five lines from somewhere in the middle of the bash manual, which is larger than 300Kb, and therefore it is inconvenient to find a referenced line number in the bash manual by scrolling down in the terminal, but it's easy to do with ack-grep:

man bash | ack-grep . --lines=4581-4585

...gives the following snippet from the bash manual as output:

       pwd [-LP]
              Print the absolute pathname of the  current  working  directory.
              The pathname printed contains no symbolic links if the -P option
              is supplied or the -o physical option to the set builtin command
              is  enabled.  If the -L option is used, the pathname printed may
share|improve this answer

An ack2 PPA for Precise 12.04 has been created by Leonard Ehrenfried here:

http://leonard.io/blog/2013/10/ack2-package-for-ubuntu-1204-precise/

https://launchpad.net/~leonard-ehrenfried/+archive/ack2

For those like me on Quantal 12.10, the PPA can still be used once added by replacing "quantal" with "precise" in /etc/apt/sources.list.d/leonard-ehrenfried-ack2-quantal.list

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.