1. Prerequisite
The current version of Apache Ant is 1.10.x which requires Java 1.10 at minimum. Therefore, you should make sure you have suitable Java installed on your environment.
2. Install Apache Ant on Ubuntu manually
Download Ant
You can download Ant distribution from the Apache Ant website. Currently, the latest release of Ant is version 1.10.x.