简体   繁体   English

在MAC OS X 10.11上使用自制软件安装ant不能正常工作

[英]Installing ant using homebrew on MAC OS X 10.11 not working properly

I installed Apache ant on my MAC OS X 10.11 today using Homebrew. 我今天使用Homebrew在MAC OS X 10.11上安装了Apache ant。

I saw following warning after running brew install ant command on MAC terminal : - 在MAC终端上运行brew install ant命令后,我看到以下警告:-

Warning: ant-1.9.6 already installed, it's just not linked. 警告: ant-1.9.6已经安装,只是没有链接。


Then I tried to check if ant is working properly or not by typing ant -version command on MAC Terminal window. 然后,我尝试通过在MAC终端窗口中键入ant -version命令来检查ant是否正常工作。 I am receiving following error : 我收到以下错误:

-bash: ant: command not found -bash:ant:找不到命令


Is it because my ANT HOME Path is not set properly or it is not able to find the JAVA PATH ? 是因为我的ANT HOME Path设置不正确,还是找不到JAVA PATH?

brew installs software into a special directory named Cellar . brew将软件安装到名为Cellar的特殊目录中。 After installation executables are linked symbolically to /usr/local/bin . 安装后,可执行文件将符号链接到/usr/local/bin This folder is in your PATH and therefore you can directly call all executables by typing the command. 该文件夹位于PATH ,因此您可以通过键入命令直接调用所有可执行文件。


Warning: ant-1.9.6 already installed, it's just not linked.

If you see this warning, the package is in Cellar, but not linked to /usr/local/bin . 如果看到此警告,则说明该程序包在Cellar中,但未链接到/usr/local/bin A simple brew link ant will do the linking step for you. 一个简单的brew link ant将为您完成链接步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM