86
17
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!
It seems that homebrew does NOT create the needed (by some tools like cocos2dx-android) ant_path. – Jonny – 2015-04-22T07:18:14.333
Install specific version (1.9):
brew install ant@1.9
– Al Belsky – 2017-06-02T14:58:52.097Worked like a charm. – Robert Karl – 2013-06-24T22:12:12.943
7
brew install homebrew/dupes/ant
also works. – Jess – 2013-10-22T23:41:53.08323as of today, you just need brew install ant – awenkhh – 2013-10-23T12:55:38.207
4Just 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 – 2013-10-23T14:30:04.5204
I had 404 even after update. I've tried:
– helios – 2013-10-29T13:45:00.267brew tap homebrew/dupes
and thenbrew install ant
and worked. (Source: http://blog.xk72.com/post/53124504531/homebrew-dupes-installing-ant-on-mac-os-x )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 – 2013-11-03T23:22:17.263To get around the issue mentioned in my previous message, I edited
/usr/local/Library/Formula/ant.rb
and replaced the URL there withhttp://www.us.apache.org/dist/ant/binaries/apache-ant-1.9.2-bin.tar.gz
. (Maybehttp://www.apache.org/dyn/closer.cgi
used to return a redirect, and it doesn't do this anymore?) – avernet – 2013-11-03T23:33:03.083@Alessandro Vernet in doing so, you will have a conflict when running brew update. You should at least do a git -a commit 'your message' to have clean repo in /usr/local/Library/Formula – awenkhh – 2013-11-04T12:12:41.617
@awenkhh Good point. I just ran
git co ant.rb
afterwards, to clean up my changes, since I most likely won't need to run this in the future anymore. – avernet – 2013-11-04T17:10:21.273