user6758349
user6758349

Reputation:

Apt-get install maven did not install latest version

I need to get Maven 3.25 or later in my Linux Ubuntu VM. After running the command sudo apt-get install maven, the system downloaded Maven 3.0.5. Is there a way to get the latest version of Maven (3.3.9) instead using apt-get?

Upvotes: 0

Views: 4458

Answers (3)

Alek
Alek

Reputation: 3

If you are using Debian, you can use sudo apt-get install -t jessie-backports maven and it will install the newest version. (Helpful for other users trying to get help.)

Upvotes: 0

Afforess
Afforess

Reputation: 934

The version of maven in the ubuntu universe repository does not always match the latest available version of software. In addition, Ubuntu does not upgrade packages for new features after shipping a release, only patches and security updates, unless you upgrade the Ubuntu version you are on.

For example, Ubuntu Xenial (16.04) currently ships Maven 3.3.9, but Ubuntu Trusty (14.04) only ships Maven 3.0.5. You have multiple options:

  • Install maven manually from the maven website.
  • Upgrade the version of Ubuntu you are using to 16.04, and the package manager will upgrade maven to the 3.3.9 version of maven.

Upvotes: 2

Vyacheslav Enis
Vyacheslav Enis

Reputation: 1661

You can run sudo apt-get update to check for package updates. After that potentially sudo apt-get install maven will install more recent version.

Upvotes: 0

Related Questions