Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After upgrading to OS X 10.9 Mavericks, ant is no longer on my path.

[126] 11:23:26 rkarl-mba-4:~/mobile-baselayer > ant
zsh: permission denied: ant
[126] 11:23:50 rkarl-mba-4:~/mobile-baselayer > which ant
ant not found

I tried installing through homebrew

[126] 11:23:09 rkarl-mba-4:~/mobile-baselayer > brew install ant
Error: No available formula for ant

It's odd that homebrew doesn't have a formula for that....

After googling, I found this article, which suggested using a user's custom formula for brew.

[1] 11:23:56 rkarl-mba-4:~/mobile-baselayer > brew install https://raw.github.com/adamv/homebrew-alt/master/duplicates/ant.rb

curl: (22) The requested URL returned error: 404 Not Found
Error: Failure while executing: /usr/bin/curl -f#LA Homebrew\ 0.9.4\ (Ruby\ 1.8.7-358;\ Mac\ OS\ X\ 10.9) https://raw.github.com/adamv/homebrew-alt/master/duplicates/ant.rb -o /Library/Caches/Homebrew/Formula/ant.rb

Any help would be appreciated!

share|improve this question

6 Answers 6

up vote 86 down vote accepted

It looks like the alternate repository was migrated. You can either enable the homebrew alternate repository or install directly after updating your brew:

brew update
brew install ant
share|improve this answer
7  
brew install homebrew/dupes/ant also works. –  Andrew Koester Oct 22 '13 at 23:41
22  
as of today, you just need brew install ant –  awenkhh Oct 23 '13 at 12:55
4  
Just as an aside: if you already have Homebrew installed (as I did, from a while back), make sure you perform a brew update before you try the accepted answer or else you may get a 404 error. It is good policy to update your formulas before install but I might have let that slip my mind... –  Matt Ray Oct 23 '13 at 14:30
4  
I had 404 even after update. I've tried: brew tap homebrew/dupes and then brew install ant and worked. (Source: blog.xk72.com/post/53124504531/… ) –  helios Oct 29 '13 at 13:45
1  
@awenkhh But this gives ==> Downloading http://www.apache.org/dyn/closer.cgi?path=ant/binaries/apache-ant-1.9.2-bin.tar.‌​gz. Error: Couldn't determine mirror. Try again later. While the URL mentioned in that error message loads find in the browser. –  avernet Nov 3 '13 at 23:22

I usually install ant via Homebrew. There is a pretty good documentation how to get it running on Mavericks.

Good luck.

share|improve this answer
2  
That post doesn't even recommend itself anymore! –  matt burns Nov 21 '13 at 14:17
    
I followed the documentation and it worked for me. –  pushya Jul 29 at 18:15

As an alternative to Homebrew, you can always download a binary distribution of Ant from http://ant.apache.org/bindownload.cgi. It works fine on OS X Mavericks.

Just download it, unzip/untar it, and add its bin directory to your PATH.

share|improve this answer

Upgraded to Mavericks this morning and found "command not found: ant"

brew update

Ran the the update and then tried to install ant.

brew install ant

Ant was installed, but it also yeilded this alert:

Warning: No developer tools installed. You should install the Command Line Tools. Run xcode-select --install to install them.

xcode-select --install

Now, everything is running fine.

share|improve this answer

The sequence that worked for me:

xcode-select --install
brew update
brew install ant
share|improve this answer
    
It works, but I get: "Warning: A newer Command Line Tools release is available Update them from Software Update in the App Store." but there are no updates on the app store. –  Bram Nov 27 '13 at 18:21

I had ant installed before upgrading to Mavericks. Afterwards, ant didn't work at all. The ONLY thing that worked for me was this:

brew uninstall ant

brew install ant

share|improve this answer

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.