1

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?

1 Answer 1

2

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 http://betterthangrep.com/ack-standalone > ~/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.

5
  • I see it in: /opt/local/libexec/perl5.12. Is it correct install location for binary?
    – Lukasz
    Feb 13, 2013 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=$PATH:/opt/local/libexec/perl5.12': not a valid identifier when I try to export
    – Lukasz
    Feb 13, 2013 at 13:56
  • 1
    It is 'export PATH...` Leave off the "$" Sorry about that. I fixed the post.
    – Ɱark Ƭ
    Feb 13, 2013 at 14:03
  • Thanks. I ended up copying ack executable to the /opt/local/bin anyway.
    – Lukasz
    Feb 13, 2013 at 14:08
  • 2
    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, 2013 at 15:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .