Why can't I run ack from terminal after switching from ubuntu to archlinux?

I just switch from ubuntu to archlinux and I installed ack-grep via pacman. However, I found that I cannot start $ ack

from the directy terminal. I have to type $ perl ack

what is pain ... I wonder if anyone has experienced a similar situation and how you are solving it.

thank

+3


source to share


3 answers


It depends on the shell used. Probably the simplest thing you can do (assuming bash

) is create an alias for your desired command, like this:

alias acx='perl ack'

      

You probably want to place this location in one of your startup scripts, for example, .profile

or .bash_profile

in your home directory.



If you're using a different string that doesn't support aliases, you can resort to providing a script to translate for you, for example put the following file acx

in your path:

perl ack "$@" # or however your particular sheel transfers all arguments.

      

+1


source


There is no reason to use an alias here. In this case, it is perl's job to update $ PATH. Seeing that the perl package is included in the base group, then at most re-login should fix everything.

I have also tested this on my system and pacman -Syu ack

(-Syu should always be used when installing).

# pacman -Syu ack

# ack --help

(no mistakes)



AND

$ which ack

/usr/bin/vendor_perl/ack

+4


source


You don't need to make an alias to run ack as the above answer suggests. Instead of creating workaround aliases, let your problem be fixed.

Why can't you run ack? What happens when you launch it? Did you receive an error message? What was the error message?

0


source







All Articles