How to install/upgrade Apache Ant 1.8.2 with apt-get on Ubuntu natty. I tried sudo apt-get upgrade ant and sudo apt-get install ant(after removing the already installed version ie.,1.8.1) but nothing works. Every time it installs Ant 1.8.1 only.


As you have found - you cannot "upgrade" this way. Repositories are usually stable code bases updated only with stability and security fixes - rarely newer versions of applications.

The eclipse team have packaged v1.8.2 of ant via their PPA.

If you want to go down that route

sudo add-apt-repository ppa:eclipse-team/debian-package
sudo apt-get update
  • 2
    It should be noted that PPAs aren't "Official" and can result in a broken system. Please use them sparingly and only when you trust the author. – Marco Ceppi Aug 2 '11 at 12:52
  • Agreed with Marco. You should only use PPAs if you absolutely trust the source(s) – Thomas Ward Aug 2 '11 at 13:30
  • To supplement this, if your version of ubuntu doesn't have add-apt-repository you can install it with sudo apt-get install python-software-properties – Conrad.Dean Feb 2 '13 at 0:20

1.8.2 hasn't been packaged for Natty yet, the most recent packaged version of Ant in the Natty archives is 1.8.1-1. 1.8.2 has been packaged for Oneiric, so you can either wait for Oneiric release, or you could follow the Backport request process and request that the Oneiric packages get backported to Natty.

You could also compile Ant from source, if you liked, but that could cause issues if you ever want to go back to getting Ant through the repos.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.