Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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
add comment

1 Answer

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 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.

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
1  
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
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 '13 at 15:29
add comment

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.