bash mvn command not found Failed to search for file Cannot update read-only repo

0 votes

Hi Guys,

I have installed maven in my system properly. But still it is showing me the below error.

[root@localhost ~]# mvn --version
bash: mvn: command not found...
Failed to search for file: Cannot update read-only repo

How can I solve this error?

Jun 3, 2020 in DevOps & Agile by akhtar
• 38,210 points

1 answer to this question.

0 votes


You got this error because you didn't set maven path in .bashrc file. Set maven path in .bashrc file, it will not give any error.

export M2_HOME=/maven/
export PATH=/maven/bin:$PATH 

Hope this will help.

answered Jun 3, 2020 by MD
• 95,300 points

Related Questions In DevOps & Agile

0 votes
1 answer

to check file has the same value or not i.e comparing file with stat module.

Try the following script: Do the second time ...READ MORE

answered May 1, 2018 in DevOps & Agile by shubham
• 7,320 points
0 votes
1 answer

docker installation command not found

Here is a simple command which you ...READ MORE

answered Nov 16, 2018 in DevOps & Agile by anonymous
0 votes
1 answer

Docker for Windows error: “Failed to create symbolic link”

The error is telling you that  /var/www/html/externals/public_html ...READ MORE

answered Nov 26, 2018 in DevOps & Agile by Sophie may
• 10,550 points
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
1 answer

Failed to restart grafana.service: Unit not found.

Hi@akhtar, After installing grafana in your system, you ...READ MORE

answered May 27, 2020 in DevOps & Agile by MD
• 95,300 points
0 votes
1 answer