It appears brew DOES have a recipe for hbase, but it fails with a 404 when downloading hbase itself.
13:44:51/java:11 $brew install hbase
==> Downloading http://www.apache.org/dyn/closer.cgi?path=hbase/hbase-0.94.11/hbase-0.94.11.tar.gz
==> Best Mirror http://apache.mirrors.tds.net/hbase/hbase-0.94.11/hbase-0.94.11.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
Error: Download failed: http://www.apache.org/dyn/closer.cgi?path=hbase/hbase-0.94.11/hbase-0.94.11.tar.gz
A corrected url would be: http://mirror.reverse.net/pub/apache/hbase/hbase-0.94.11/hbase-0.94.11.tar.gz
I am not experienced in creating/modifying brew recipes. Would this be a simple case of downloading/tweaking a brew recipe file for a correct hbase download url and then re-trying? What would be the steps?
Update
Based on comments below i did
$brew update && brew upgrade
This failed for me:
error: Your local changes to the following files would be overwritten by merge:
Library/Contributions/brew_bash_completion.sh
Library/Contributions/brew_fish_completion.fish
Library/Contributions/brew_zsh_completion.zsh
Library/Contributions/cmd/brew-dirty.rb
Library/Contributions/cmd/brew-leaves.rb
..
Library/Formula/chruby.rb
Library/Formula/cimg.
error: The following untracked working tree files would be overwritten by merge:
Library/Aliases/git-tig
Library/Aliases/libtcnative
Library/Contributions/cmd/brew-bundle.rb
..
Library/Formula/vtclock.rb
Library/Formula/x11vnc.rb
Library/Formula/x265.rb
Library/F
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
Worked for me as well:
[ ~] brew install hbase
==> Installing hbase dependency: hadoop
==> Downloading http://www.apache.org/dyn/closer.cgi?path=hadoop/core/hadoop-1.2
==> Best Mirror http://www.dsgnwrld.com/am/hadoop/core/hadoop-1.2.1/hadoop-1.2.1
############
After searching for how to fix brew update && brew upgrade , then following some instructions on Brew update failed: untracked working tree files would be overwritten by merge and doing some manual updating of permissions under /usr/local, I was able to install hbase.
The following solved my problem, the code simply gets latest references from git
cd /usr/local && git reset --hard FETCH_HEAD
or if it fails
cd /usr/local && sudo git reset --hard FETCH_HEAD
Related
I have the following vars in place in my Macbook. However when I try to install gh I get the ERROR below:
export HTTPS_PROXY=http://myproxy.com:8080
export HTTP_PROXY=http://myproxy.com:8080
wferreir#QQN6DR99LY ~ % brew install gh
Warning: git 2.36.1 is already installed and up-to-date.
To reinstall 2.36.1, run:
brew reinstall git
Warning: No remote 'origin' in /opt/homebrew, skipping update!
Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-core, skipping update!
==> Downloading https://ghcr.io/v2/homebrew/core/gh/manifests/2.10.1
curl: (22) The requested URL returned error: 407
Error: gh: Failed to download resource "gh_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/gh/manifests/2.10.1
wferreir#QQN6DR99LY ~ %
I revolved the issue by configuring a proxy for GIT:
git config --global http.proxy http://proxyUsername:proxyPassword#proxy.server.com:port
I run the following code, which show that there are no openssl repo find in brew.
My Mac is macOS Big Sur 11.3.1
% brew install openssl
Updating Homebrew...
fatal: Could not resolve HEAD to a revision
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 1 cask.
Warning: No available formula or cask with the name "openssl".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
This formula was found in a tap:
homebrew/portable-ruby/portable-openssl
To install it, run:
brew install homebrew/portable-ruby/portable-openssl
UPDATE
Seems that my brew can't install ccache either like the following. It is more of a brew issue?
brew install ccache
try this put it in terminal and run:
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
The following commands help
cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git
try this:
git -C $(brew --repo homebrew/core) checkout master
^This should be the fix anytime you see the error "Could not resolve HEAD to a revision, as you may find at the bottom of the output when running "brew doctor"
I'm having trouble with brew install <PackageName>
I had macOS BigSur and could use commands like brew easily but in recent downgrade (Mojave) I can't do it anymore
it freeze about 60 second and reply with (If I getting it right) that can't update the main repository
CODE :
Updating Homebrew...
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Could not resolve HEAD to a revision
==> Homebrew has enabled anonymous aggregate formula and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> New Casks
8x8-work disk-expert guilded odbc-manager ubports-installer
diagnostics duplicate-file-finder hush pktriot
==> Updated Casks
Updated 352 casks.
==> Deleted Casks
adafruit-arduino beautune caramba-switcher
adobe-lens-profile-creator blue-jeans-browser-plugin
Warning: No available formula or cask with the name "htop".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> 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.
Homebrew is managed by git repos. From the output, homebrew is detached and homebrew-core repo is missing.
Let's try following commands to fix the repos.
# Reset remote repo for Homebrew, the pkg manager itself
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
# Reset origin for homebrew taps
BREW_TAPS="$(brew tap)"
for tap in core cask{,-fonts,-drivers,-versions}; do
if echo "$BREW_TAPS" | grep -qE "^homebrew/${tap}\$"; then
git -C "$(brew --repo homebrew/${tap})" remote set-url origin https://github.com/Homebrew/homebrew-${tap}.git
fi
done
brew update-reset
If it doesn't work, you may have to reinstall Homebrew.
Please help me find a solution to this error. I am installing brew with this command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
The result:
==> You are using macOS 10.13.
==> We (and Apple) do not provide support for this old version.
This installation may not succeed.
After installation, you will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew\'s GitHub,
Twitter or IRC. You are responsible for resolving any issues you experience
while you are running this old version.
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /usr/sbin/chown biad:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
HEAD is now at 3c84e1fef Merge pull request #10381 from jonchang/fix-version-type
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
fatal: Needed a single revision
invalid upstream 'origin/master'
Failed during: /usr/local/bin/brew update --force --quiet
It seems you are trying to overwrite an existing install that has a broken core tap. Try deleting the homebrew core folder like this:
rm -fr $(brew --repo homebrew/core)
Then reinstall homebrew using:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Hope this works for you.
This generally happens when something with homebrew/core is corrupt.
% find /opt/homebrew /usr/local/ -type d -name homebrew-core -print
% rm -rf the-directories-found-in-the-above-find
% brew tap homebrew/core
First find your homebrew-core, then remove (rm -rf), then reinstall. If this fails because it didn't install enough to get a working brew, then remove the directory and retry the initial install.
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