Error installing hadoop with homebrew - macos

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?

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

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:
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
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
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

Related

Brew Install Trouble

I'm struggling to brew install minikube. I don't have any version, but need an older version. I'm trying the familiar way, but get an error:
~ brew install minikube#1.18.1
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "minikube#1.18.1".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
I've tried to do a bit of homework, but still errors:
~ brew install https://github.com/Homebrew/homebrew-core/blob/8d37c361ee69503961a3010e7896f6ecf8d3a059/Formula/minikube.rb
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 16 formulae.
Traceback (most recent call last):
`brew extract` or `brew create` and `brew tap-new` to create a formula file in a tap on GitHub instead.: Invalid usage: Non-checksummed download of minikube formula file from an arbitrary URL is unsupported! (UsageError)
`brew extract` or `brew create` and `brew tap-new` to create a formula file in a tap on GitHub instead.: Invalid usage: Non-checksummed download of minikube formula file from an arbitrary URL is unsupported! (UsageError)
This must be elementary, but I can't seem to figure this out :(
$brew update-reset
This helped me with the error.
Brew only does creates separate versions for certain formula, and its mostly only the larger ones where they might provide different versions due to backward compatibility and stuff.
You might have some luck with the answers in this question Homebrew install specific version of formula?.
Before running:
brew install https://github.com/Homebrew/homebrew-core/blob/8d37c361ee69503961a3010e7896f6ecf8d3a059/Formula/minikube.rb
you should execute:
brew unlink minikube
That way you will remove the old minikube links and link the newly installed binary.
If that's still not working than try running:
wget https://github.com/Homebrew/homebrew-core/blob/8d37c361ee69503961a3010e7896f6ecf8d3a059/Formula/minikube.rb
followed by:
brew install --HEAD -s minikube.rb
I think first you can try to run 'brew install minikube' only, see if you can successfully install it or not. If no error then it's probably your version issue. If still has Error then that might be your local home-brew issues, then you can Try to run 'brew doctor', based on the warning and Error info search in stackoverflow you probably will find out the answer.

Libtiff dependancy fails when installing wine with homebrew OSX 10.12.3

I am trying to install wine through homebrew. When its installing the dependancies, the libtiff fails because the source package url is not found and whole installer quits. I installed libtiff seperately and then tried, still this problem occurs. Any workaround ?
Rangarajans-MBP:homebrew-core ranga$ brew install wine
==> Installing dependencies for wine: libtiff, gd, libgphoto2, little-cms2, cmake, jasper, libicns, makedepend, openssl, net-snmp, sane-backends, libtasn1, gmp, nettle, libunistring, libffi, p11-kit, gnutls
==> Installing wine dependency: libtiff
==> Using the sandbox
==> Downloading http://download.osgeo.org/libtiff/tiff-4.0.7.tar.gz
######################################################################## 100.0%
==> Downloading https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tar.xz
curl: (22) The requested URL returned error: 404 Not Found
Trying a mirror...
==> Downloading https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tar.xz
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "libtiff--patch"
Download failed: https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tar.xz
Rangarajans-MBP:homebrew-core ranga$
ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.t‌​ar.xz has been superseded by ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-5.debian.t‌​ar.xz. If you compare the files, there's an extra CVE patch added.
To get homebrew to install wine, patch the libtiff formula to use the updated Debian package:
Open /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/libtiff.rb
Patch the following lines so it looks like this: https://gist.github.com/georghendrik/c649b62c017c89980ec6fcad31513510
url "https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.7-5.debian.tar.xz"
sha256 "f4183c48ed74b6c3c3a74ff1f10f0cf972d3dba0f840cf28b5a3f3846ceb2be6"
"patches/16-CVE-2016-10094.patch", (note the comma)
"patches/17-CVE-2017-5225.patch"
Run brew install wine. Homebrew will update itself and stash your work.
Run cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/; git stash pop
Run brew install wine again.

Trouble installing Ruby (Failed to download resource "readline--patch")

I'm getting this error when I try to install Ruby. I've tried looking at this and this but to no avail
➜ ~ brew install ruby
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Installing dependencies for ruby: readline, libyaml, makedepend
==> Installing ruby dependency: readline
==> Downloading https://ftpmirror.gnu.org/readline/readline-6.3.tar.gz
==> Downloading from http://mirror.team-cymru.org/gnu/readline/readline-6.3.tar.gz
######################################################################## 100.0%
==> Downloading https://gist.githubusercontent.com/jacknagel/d886531fb6623b60b2af/
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "readline--patch"
Download failed: https://gist.githubusercontent.com/jacknagel/d886531fb6623b60b2af/raw/746fc543e56bc37a26ccf05d2946a45176b0894e/readline-6.3.8.diff
I've met the same problems when I installed Ruby on my Mac. Maybe you could try the following steps to solve this problem, it works for me :)
update your brew, paste /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" at a Terminal prompt. (or following instructions on brew homepage) Or just brew update
Run brew install ruby
Good luck to you! :)

brew install hbase tries to install hadoop though already present

Hadoop is already present (and has been working fine for better part of a year)
07:48:30/~:177 $which hadoop
/usr/local/Cellar/hadoop/1.2.1/libexec/bin/hadoop
But attempting to install hbase results in a hadoop dependency error:
07:48:28/~:176 $brew install hbase
==> Installing hbase dependency: hadoop
Warning: Could not link hadoop. Unlinking...
Error: Permission denied - /usr/local/bin/task-controller
Try the following
$ brew upgrade hadoop
$ brew install hbase
After I uninstalled hbase this particular error did not recur: instead the following happened:
https://stackoverflow.com/questions/24288842/running-hbase-on-mac-connection-reset-by-peer

Failing while running `brew install

I am trying to re-install Nokogiri dependencies with homebrew following the steps described here. I had nokogiri working fine before, but had to remove macports to make some space on my mac.
Running into errors at the first step:
$ brew install libxml2 libxslt
Warning: Your Xcode (3.2.2) is outdated
Please install Xcode 3.2.6.
==> Downloading ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz
Warning: Failed to create the file
Warning: /Library/Caches/Homebrew/libxml2-2.8.0.tar.gz
0.0%
curl: (23) Failed writing body (0 != 1448)
Error: Download failed: ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz
Any idea how to fix this?
Is the warning about Xcode version significant?
The relevant message above seemed to be Warning: Failed to create the file.
Tried to create the /Library/Caches/Homebrew/libxml2-2.8.0.tar.gz file manually, and got a Permission denied error.
Changed the ownership of the folder to my username:group with
sudo chown <username>:<group> /Library/Caches/Homebrew/
With that change, the brew install step worked successfully!
Note: The answers to brew install mongodb error: Cowardly refusing to `sudo brew install' Mac OSX Lion helped in figuring out the problem.

Resources