Janardhan's insights
Home PageEmotional Intelligence book
  • About Insights
  • Janardhanpulivarthi.com
  • Books I've read
  • Bridge Engineering
    • code and books
    • Pier calculations
    • Suspension cables
    • Seismic coefficients
    • Shear check in pilecap
    • finance tasks
    • /bin/sh: 1: flex: not found
    • Biology animations
  • 🏕️SEASON 1
    • Social formulation
    • Words in Computer Science
    • Best use of internet
    • Products for sustainability
    • Tools for parents in digital age
    • Identify books in library
    • Control digital footprint
    • Search like a Pro
    • Dev productivity tips & tools
    • McKinsey, How it operates
    • Secrets, which ones to share
    • How to be Straightforward
    • Productive procrastination
    • Everyday things
    • Future of waste
    • Emotional weather
    • Money rules
    • Qualities of an Artist
    • Shameful Inconsistency
    • Mean Sea Level
    • Screenshot on Windows
    • Edu loan EMI calculation
    • Advanced Gmail tips
    • 24 hours before an exam
    • FAQ - git
    • Life skills by 25
    • Install Microsoft IIS server
    • gcloud commands hang
    • Google Cloud Data Engineering
    • Google Cloud Architect
    • find location of the command
    • JNI short tutorial
    • Civil distance
    • Being a friend to children
    • How to talk to a teenager
    • Resilience and relationship
    • 9 to 5 vs 4 hour workweek
    • Return on Investment
    • Alternative to PFA
    • Hand position for Ctrl key
    • Education: The Good Parts
    • Education: The proposed parts
    • On feeling stuck
    • How to read Financial news
    • What is in my hands
    • Mistakes founders do
    • On Self Worth
    • Emotional draining situations
    • Time
    • Hygiene
    • 5 Percent rule
    • How not to build a startup
    • How to lead a mediocre life
    • Day-to-day tips from extraordinary people
    • Who owns .com domain
    • Do not make bed first thing in morning
    • How to read kubernetes docs
    • Do not use morning alarm
  • ☀️Season 2
    • Practicing self care
    • Payment methods
    • Things to learn before MBA
    • Hum toh udd gaye
    • Time windows
    • How to quit a job emotionally
    • Journal on a year after quitting
    • Engineering the future
    • Build linux kernel
    • Important inventions
    • bashrc and bash_profile
    • $TERM
    • How Kubernetes pod get terminated
    • What data does google collect? when you search...
    • Should I build a personal brand?
    • The better startup ideas
    • Regex in Visual Studio Code
    • Few pieces to read before breakfast
    • core file
    • How to keep home for ambience
    • 🐬A story on repetition
    • Basic Unicode characters
    • Java operator precedence
    • Install latest maven on Ubuntu
    • Build ecosystems, not only products
  • ⛈️SEASON 3
  • ❄️Season 4
    • Be original
    • Change and Contingency
    • Read and write email
    • How to use Pomodoro
    • Humans and software
    • Saving money without money
    • Five skills for Civil Engineers
    • Que sera sera
    • Keep scrolling
    • Being unemployed
    • Friendship and modularity
    • Happy is not a default emotion
    • The missing piece in the online courses
    • How to build products
    • I am always tired
    • Instead company subscribe to user
    • Car electric or diesel ask google ngram viewer
    • Emotional currency and binge watching
    • ADR
  • Known Nokia 7.1 problems
  • Coursera-dl HTTPError: 400
  • Failed to retrieve identities from agent
  • Custom domain email
  • Qwiklabs tips and tricks
  • Online shopping rules
  • Protect a apt package from upgrade
  • Kubernetes troubleshooting guide
  • TOOLS
    • Lenovo Ideapad
    • Quantum - Holevo's theorem
    • Install VPP on Ubuntu
  • Phone camera slider
  • Physical internet infrastructure
  • 100 Days Of Code - Learning Java
  • Blogs I found interesting
  • 5g
    • 5G Glossary
    • Archive
      • Latex and gitbook
      • Japan Progress
      • Online buying guide
      • ఏవిధంగా కృషి చేయాలి?
      • Tech prediction 2030
      • Alphabet Financials
      • Apachecoin does not exist
      • non profits
      • What to Google Search
      • Resume tips
      • Discussion before marriage
      • Wi-Fi
      • How to read
      • Basic soil test
Powered by GitBook
On this page
  • Maven Installation
  • Troubleshooting
  • Java Installation

Was this helpful?

Edit on GitHub
  1. Season 2

Install latest maven on Ubuntu

PreviousJava operator precedenceNextBuild ecosystems, not only products

Last updated 2 years ago

Was this helpful?

Maven Installation

  1. Get the latest maven from

  2. Choose a binary zip or tar archive (see Link header) and download with

wget https://downloads.apache.org/maven/maven-3/3.8.3/binaries/apache-maven-3.8.3-bin.zip
  1. Unzip and move to /usr/local/

unzip apache-maven-3.8.3-bin.zip
sudo mv apache-maven-3.8.3 /usr/local
  1. add to path and reopen terminal

export PATH=/usr/local/apache-maven-3.8.3/bin:$PATH

or

ln -s /usr/local/apache-maven-3.8.3/bin/mvn /usr/bin/mvn
  1. mvn version check

$ mvn -version

Apache Maven 3.8.3 (...)
Maven home: /usr/local/apache-maven-3.8.3
Java version: 1.8.0_292, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-18362-microsoft", arch: "amd64", family: "unix"

Troubleshooting

1 Command 'unzip' not found

$ unzip apache-maven-3.8.1-bin.zip 

Command 'unzip' not found, but can be installed with:

sudo apt install unzip

for installing unzip,

do:

sudo apt update
sudo apt install unzip

2 The JAVA_HOME environment variable is not defined correctly

$ mvn -version

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

3 check for java

Install Java as per the instructions in the next section.

Java Installation

$ java -version

Command 'java' not found, but can be installed with:

sudo apt install openjdk-11-jre-headless  # version 11.0.11+9-0ubuntu2~20.04, or
sudo apt install default-jre              # version 2:1.11-72
sudo apt install openjdk-8-jre-headless   # version 8u292-b10-0ubuntu1~20.04
sudo apt install openjdk-13-jre-headless  # version 13.0.4+8-1~20.04
sudo apt install openjdk-14-jre-headless  # version 14.0.2+12-1~20.04

for installing java:

sudo apt update
sudo apt install openjdk-8-jdk-headless

Video

Run through of commands

[1]

[2]

use JDK not JRE. i.e., openjdk-8-jdk-headless instead of openjdk-8-jre-headless otherwise you would come across an error like:

☀️
https://maven.apache.org/download.cgi
https://maven.apache.org/install.html
https://maven.apache.org/download.cgi
Unable to find javadoc command:The javadoc executable '/usr/lib/jvm/java-11-openjdk-amd64/bin/javadoc'