Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After installing p5-app-ack using Macports I can see it is installed correctly. enter image description here

I can not run it however. I get ack: command not found. and which ack displays nothing. How can I see where port installed my ack and how to add it to the executalble PATH?

share|improve this question
up vote 2 down vote accepted

MacPorts, by default, installs into /opt/local/, judging by the screen shot ack should be in /opt/local/perl/p5-app-ack/ if you used the default install path. Make sure that path is in your $PATH environment variable.

To add it to your path edit your shell config file (probably ~/.profile or ~/.bashrc) and add or modify the following line. export PATH="$PATH":/opt/local/perl/p5-app-ack

I don't use MacPorts for ack, I install it manually with the following command from the ack install page.

curl > ~/bin/ack && chmod 0755 !#:3

This will install ack into the $HOME/bin/ folder as a single large perl file and I did not have to modify my $PATH variable.

share|improve this answer
I see it in: /opt/local/libexec/perl5.12. Is it correct install location for binary? – Lukasz Feb 13 '13 at 13:53
And I get: export $PATH='$PATH':/opt/local/libexec/perl5.12 -bash: export: `/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin=$PA‌​TH:/opt/local/libexec/perl5.12': not a valid identifier when I try to export – Lukasz Feb 13 '13 at 13:56
It is 'export PATH...` Leave off the "$" Sorry about that. I fixed the post. – Mark Feb 13 '13 at 14:03
Thanks. I ended up copying ack executable to the /opt/local/bin anyway. – Lukasz Feb 13 '13 at 14:08
fwiw brew seems to do a better job at ensuring all binaries are symlinked to /usr/local/bin. I ran into so many issues like this using ports that I just gave up and went to brew. – dstarh Feb 13 '13 at 15:29

Your Answer


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.