I was having the same error message although my process was a little 
different... I think. I had previously installed or uninstalled or directly 
applied the diversion command. Anyways, I had the diversion without having 
ack-grep installed. Following the askubuntu tip I un-diverted using 
dpkg-divert --package ack-grep --local --remove --rename --divert /usr/bin/ack 
/usr/bin/ack-grep
then used apt to reinstall. There's no need to directly run the dpkg-divert 
command as of version 2.14-4.


On Friday, September 8, 2017 at 11:06:49 PM UTC-5, Ruben V wrote:
>
> when I try to install ack-grep using 
> sudo apt install ack-grep
>
> I get the following error:
>
> Selecting previously unselected package ack-grep.
> Preparing to unpack .../ack-grep_2.14-4_all.deb ...
> Unpacking ack-grep (2.14-4) ...
> dpkg: error processing archive /var/cache/apt/archives/ack-grep_2.14-4_all
> .deb (--unpack):
>  trying to overwrite '/usr/bin/ack', which is the diverted version of 
> '/usr/bin/ack-grep'
> Processing triggers for man-db (2.7.5-1) ...
> Errors were encountered while processing:
>  /var/cache/apt/archives/ack-grep_2.14-4_all.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> How can I fix this?  I have ack-grep install via a bash script that 
> executes the dpkg diversion command eventhough the package doesn't install. 
> Not sure if that's helpful.
>

-- 
You received this message because you are subscribed to the Google Groups "ack 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ack-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to