bash - 在 bash 中找不到 Ant 命令(Windows 32 位)

标签 bash apache github ant git-bash

我使用链接 http://www.mkyong.com/ant/how-to-install-apache-ant-on-windows/ 安装了 Apache ant

我正在尝试在 git bash 中构建我的文件。
当我输入 ant 时它显示以下错误:

bash:ant:command not found

我想使用cd build 命令。

最佳答案

在 bash session 中检查您的 PATH。

echo $PATH

不要忘记,在更新链接中提到的 PATH 之后(通过环境变量控制面板),您需要打开一个 CMD session 并启动 git-bash .exe 以便该 session 继承修改后的 PATH。

cd c:\path\to\git
git-bash.exe
echo $PATH

OP 在评论中确认 PATH 现在是:

d/Users/h169717/bin:/mingw32/bin:/usr/local/bin:/usr/bin:/bin/:/mingw32/bin:/us‌​‌r/bin:/d/Users/h169717/bin:/c/Program Files/apache-ant-1.9.6/bin:/c/Program Files/Java/jre1.8.0_72/bin:/c/Program Files/apache-ant-1.9.6/bin:/usr/bin/vendor_perl:/usr/bin/core_perl

ant 正在工作。

关于bash - 在 bash 中找不到 Ant 命令(Windows 32 位),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35263221/

相关文章:

python - Flask 的 Apache 配置文件

github - 如何将 github 问题转发到邮件列表?

linux - ImageMagick 转换循环挂起

bash - 错误 : the option `Z` is only accepted on the nightly compiler

apache - 单个主机上的 2 个或更多 Zend 应用程序具有基本 url 重写

ruby-on-rails - 使用 apache 和 passenger 部署 Rails 应用程序后,显示页面不存在

git - 远程 : Repository not found

rest - 在 Delphi 中使用来自 Indy 的 GitHub API

bash - -bash : !“:未找到事件

java - 使用 java 类路径运行脚本