Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing hadoop with homebrew

I'm trying to get hadoop setup locally on my Mac, but am getting the following error when trying to brew install hadoop:

$ brew install hadoop
==> Downloading http://www.apache.org/dyn/closer.cgi?path=hadoop/core/hadoop-1.1.2/hadoop-1.1.2.tar.gz
==> Best Mirror http://apache.mirrors.pair.com/hadoop/core/hadoop-1.1.2/hadoop-1.1.2.tar.gz

curl: (22) The requested URL returned error: 404
Error: Download failed: http://www.apache.org/dyn/closer.cgi?path=hadoop/core/hadoop-1.1.2/hadoop-1.1.2.tar.gz

Any ideas what I should do?

like image 409
Evan Zamir Avatar asked Aug 14 '13 19:08

Evan Zamir


People also ask

Can we install hadoop in Mac?

In this brief tutorial, I will show you how you can very easily install Hadoop 3.2. 1 on a macOS Mojave (version 10.14. 6) using Terminal for a single node cluster in pseudo-distributed mode. To begin, you will need to have installed several packages that need to be placed in the appropriate directories.

Where is hadoop installation directory Mac?

The home directory for hadoop is: /usr/local/Cellar/hadoop/2.7. 6/libexec/, while the configuration files are located at /usr/local/Cellar/hadoop/2.7. 6/libexec/etc/hadoop/.


2 Answers

You have to do a brew update first. It was pointing to the wrong version, but that seems to be fixed now.

like image 104
Garrett Hall Avatar answered Nov 15 '22 05:11

Garrett Hall


It seems that Homebrew formula for Hadoop is outdated, it points to 1.1.2 instead of 1.2.1. Until the guys from Homebrew fix the bug you can do the following steps in order to install Hadoop 1.1.2:

  1. Download manually version 1.1.2 from http://archive.apache.org/dist/hadoop/core/hadoop-1.1.2/hadoop-1.1.2.tar.gz to any folder in your computer
  2. Then move the file hadoop-1.1.2.tar.gz to homebrew's temporary folder, if you have not changed it before, it should be located in /Library/Caches/Homebrew
  3. Finally you can install Hadoop using Homebrew, now brew will find that the file has already been downloaded and will proceed with installation as follows:

    $ brew install hadoop
    ==> Downloading http://www.apache.org/dyn/closer.cgi?path=hadoop/core/hadoop-1.1.2/hadoop-1.1.2.tar.
    Already downloaded: /Library/Caches/Homebrew/hadoop-1.1.2.tar.gz
    ==> Caveats
    In Hadoop's config file:
      /usr/local/Cellar/hadoop/1.1.2/libexec/conf/hadoop-env.sh
    $JAVA_HOME has been set to be the output of:
      /usr/libexec/java_home
    ==> Summary
      /usr/local/Cellar/hadoop/1.1.2: 271 files, 78M, built in 2 seconds
    
like image 41
jabaldonedo Avatar answered Nov 15 '22 05:11

jabaldonedo