Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

brew install maven 404 error

Tags:

homebrew

maven

I did a brew install maven and it resulted in below:

==> Downloading http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.tar.gz ==> Best Mirror http://apache.oss.eznetsols.org/maven/binaries/apache-maven-3.0.4-bin.tar.gz  curl: (22) The requested URL returned error: 404 Error: Download failed: http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.tar.gz 

At first I thought it is a mirror problem with my network. But I changed to another network, and it is still the same. And still the same error after 4 days. I wonder if others are affected.

What should I do to install maven with brew?

like image 395
samwize Avatar asked Oct 06 '12 07:10

samwize


People also ask

How do I install Maven on my Macbook Pro?

2.1) Download Maven for Mac OSGo to the Maven Download site: https://maven.apache.org/download.cgi Download the “Binary tar. gz archive” file as shown in the below image. After downloading, extract it using the below command. The binaries will be extracted in the “apache-maven-3.6.

Where does brew install Maven in Mac?

This is installation guide on How to install Maven in Mac OSX using Home Brew and from Mac's Command Line Terminal. Some of the Mac OS X versions comes with Maven 3 built in, installation located at /usr/share/maven .


2 Answers

If you are still getting errors with the url, try brew update and then brew install maven. Fixed the problem for me.

like image 58
ZenBalance Avatar answered Sep 20 '22 21:09

ZenBalance


There is something strange with this mirror. You can change this with

brew edit maven 

and change the url to

http://www.apache.org/dyn/closer.cgi/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz

e.g.

require 'formula'

class Maven < Formula   homepage 'http://maven.apache.org/'   #url 'http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.tar.gz'   url 'http://www.apache.org/dyn/closer.cgi/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz'   sha1 '0de5dc162bafde3fcb0a6b009cfeea81a042523b'    def install     # Remove windows files     rm_f Dir["bin/*.bat"]      # Fix the permissions on the global settings file.     chmod 0644, Dir["conf/settings.xml"]      prefix.install %w{ NOTICE.txt LICENSE.txt README.txt }     # Install jars in libexec to avoid conflicts     libexec.install Dir['*']     bin.install_symlink Dir["#{libexec}/bin/*"]   end end 
like image 24
Eamonn Moloney Avatar answered Sep 20 '22 21:09

Eamonn Moloney