我试图安装apache ant但很多我的bash命令都不起作用。 我进入了
echo $PATH
并且回到了很长的路上
/Users/arthurlecalvez/.rbenv/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/bin::/usr/local/bin:/Users/arthurlecalvez/adt/sdk/tools:/Users/arthurlecalvez/ant/bin:/usr/local/bin:/Users/arthurlecalvez/ant/bin:/System/Library/Frameworks/JavaVM.framework/Home:/usr/local/bin:/Users/arthurlecalvez/ant/bin::/Users/arthurlecalvez/ant/bin:/Users/arthurlecalvez/ant/bin:/usr/local/bin:/System/Library/Frameworks/JavaVM.framework/Home:/Users/arthurlecalvez/ant/bin:/usr/local/bin:/System/Library/Frameworks/JavaVM.framework/Home:/Users/arthurlecalvez/ant/bin
我如何解决此问题
答案 0 :(得分:1)
运行
PATH="/usr/bin:/bin:$PATH"
显然,$PATH
中的大多数目录都位于Library
目录或/Users/arthurlecalvez
中,两者都没有默认情况下是bash命令。显然某些命令有效,因为$PATH
包含/usr/local/bin
,但大部分都不会。