Help on installing Apache maven

Hello community, i downloaded maven from its website but when i go to my terminal to check for version it shows command not found

1 Like

Am getting this

Kindly which OS are you using? Alternatively follow this link How to Install Apache Maven on Windows, macOS, and Linux? - GeeksforGeeks to fix the issue basing on your OS.

okay i switch to what OS

I wouldn’t recommend using apt to manage Maven. 3.6.3 is from 2019, so the package in the universe repo clearly isn’t being kept up-to-date (you’re immediate issue is you need to enable installations from the universe repo, which is disabled by default on Ubuntu).

You can follow the steps on this tutorial or install something like SDKMAN to manage the installation for you.

I downloaded the SDKMAN but when installing maven these are the results

What is the output when you run this command mvn -v?

Is jdk (because Maven needs it to execute) already installed?

yes it’s already installed

Kindly follow the steps on this link link and feel free to share were you are stack

yes it’s already installed

I mean installing maven since jdk is already installed

Am stack from there

Are you using a linux operating system?

Yes am using linux ubuntu 22.04 LTS

Kindly share the error above using paste bin please!

How do i paste and share

Here are the steps to use Pastebin to share an error:

  1. Open a web browser and navigate to https://pastebin.com.

  2. On the homepage, you’ll see a text box labeled “New Paste” or something similar.

  3. Copy the error message from your terminal and paste it into the large text box on the Pastebin page.

  4. Click the “Create New Paste” or “Submit” button.

  5. After submission, Pastebin will generate a unique URL for your paste.

  6. Copy the link and share for other members to view the error and help fix.