I tried to install Apache Ant on my Mac and I followed the next steps :
- I downloaded
apache-ant-1.8.1-bin.tar.gzinto my Downloads folder. - I moved the file to
/usr/local/using this commands :sudo shandmv apache-ant-1.8.1-bin.tar.gz /usr/local/
Now I want to use cd /usr/local/ but it’s not working, I get back “No such file or directory”.
Then I used cd /usr/ and ls commands and it seems that the local folder is there. If I try to access it I get the same error.
Since I already used sudo su why I can’t access it? Any ideas?
Ant is already installed on some older versions of Mac OS X, so you should run
ant -versionto test if it is installed before attempting to install it.If it is not already installed, then your best bet is to install Homebrew (
brew install ant) or MacPorts (sudo port install apache-ant), and use those tools to install Apache Ant.Alternatively, though I would highly advise using Homebrew or MacPorts instead, you can install Apache Ant manually. To do so, you would need to:
The commands that you would need, assuming
apache-ant-1.8.1-bin.tar.gz(replace 1.8.1 with the actual version) were still in your Downloads directory, would be the following (explanatory comments included):