没找到包。错误如下:
/bin/ant: 1: cd: can't cd to /bin/../share/ant/bin/..
错误: 找不到或无法加载主类 org.apache.tools.ant.launch.Launcher
- /bin/ant链接错误
quantum6@debian:/bin$ ll ant
lrwxrwxrwx 1 root root 20 8月 27 2018 ant -> ../share/ant/bin/ant
实际上这个路径根本不存在。
quantum6@debian:/bin$ whereis ant
ant: /usr/bin/ant /usr/share/ant /usr/share/man/man1/ant.1.gz
检查/usr/bin/ant链接
quantum6@debian:/bin$ ll /usr/bin/ant
lrwxrwxrwx 1 root root 20 8月 27 2018 /usr/bin/ant -> ../share/ant/bin/ant
显然是链接错误。这个时候重新链接即可:
ln -snf /usr/share/ant/bin/ant /bin/ant