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 in DevOps & Agile by akhtar
• 14,610 points
107 views

1 answer to this question.

0 votes

Hi@akhtar,

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 by MD
• 32,770 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
• 6,910 points
1,558 views
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
142 views
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
• 9,940 points
772 views
0 votes
1 answer
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
540 views
0 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 in DevOps & Agile by MD
• 32,770 points
38 views
0 votes
1 answer

How to get the file count in amazon bucket linux cli

Hi@Shahzeb, You can do this task using the ...READ MORE

answered Apr 27 in DevOps & Agile by MD
• 32,770 points
37 views