1

I have tried same like below but getting same message.

wget http://mirrors.estointernet.in/apache/maven/maven-3/3.6.0/source/apache-maven-3.6.0-src.zip # from https://maven.apache.org/download.cgi
unzip apache-maven-3.6.0-src.zip
vi .bash_profile
export JAVA_HOME=/opt/soft/jdk1.8.0_192
M2_HOME=/opt/soft/maven/apache-maven-3.6.0
export M2_HOME
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$M2_HOME/bin

After that I have executed :

source .bash_profile
mvn --version

I get the following error:

bash: mvn: command not found
2

It seems you downloaded a source archive (see the "-src" in the filename) that does not contain the binary you are trying to run. Try downloading and unpacking a binary archive (with "-bin" in the filename) instead.

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.