How to install solr 6.x with Homebrew? - macos

I want to install solr 6.6.1 and solr 6.4.1 with homebrew on my Mac.
With brew install solr, by default version 8 is installed.
With brew search solr i can only find solr versions 7.7 & 8. How do i install older versions?
I would like to be able to switch between which version of the service is running with homebrew.

It looks to me that Homebrew only keeps the last two versions. With Homebrew 1.9.2 I see Solr 6 and 5 whereas with Homebrew 2.1.1 I see Solr 7 and 8:
$ brew --version
Homebrew 1.9.2
Homebrew/homebrew-core (git revision b7182; last commit 2019-01-22)
Homebrew/homebrew-cask (git revision 44e62; last commit 2019-01-22)
$ brew search solr
==> Formulae
solr
solr#6.6
homebrew/linuxbrew-core/solr#7.7
solr#5.5
homebrew/linuxbrew-core/solr
$ brew update
# (ton's of information here)
$ brew --version
Homebrew 2.1.1
Homebrew/homebrew-core (git revision c116f; last commit 2019-04-24)
Homebrew/homebrew-cask (git revision efc7e; last commit 2019-04-24)
$ brew search solr
==> Formulae
solr
solr#7.7
I am not sure if there is a way to fetch older versions. I realize this does not fully answer the question but it was too long for a comment.

One can Install Solr#6.6 from here:
brew tap-new $USER/solr
brew extract --version=6.6 solr $USER/solr
brew search /solr/
brew install <user local formula path>

Related

where is ruby 3.0.0 on rbenv

rbenv install --list-all shows me, among many other things of course,
3.0.0-dev
3.0.0-preview1
3.0.0-preview2
But where is 3.0.0 itself, the actual final release? I'd like to try it out. Not all announced features made it into the previews so I need the real thing.
rbenv install passes thru ruby-build. You need to update (brew upgrade if installed via Homebrew) your ruby-build in order to see the latest versions.
On Ubuntu
Short answer:
# You need to update the available versions via ruby-build
~ git -C ~/.rbenv/plugins/ruby-build pull
~ rbenv install 3.0.0
...
Installed ruby-3.0.0 to ~/.rbenv/versions/3.0.0
Long answer with a beautiful picture🐈: https://richstone.io/where-is-ruby-3-0-0-on-rbenv/
Ubuntu
git -C ~/.rbenv/plugins/ruby-build pull (pulls latest ruby versions)
rbenv install 3.0.0 (or for later versions: 3.x.x)
echo "3.0.0" > .ruby-version OR rbenv local 3.0.0 to ensure ruby 3.0.0 is used.
Mac
brew upgrade

Need help installing Ruby 2.7.2 on Mac

I'm trying to install Ruby version 2.7.2 on my Mac (latest OS with all updates) and did the following
brew update
brew upgrade rbenv ruby-build
and then
rbenv install 2.7.2
ruby-build: definition not found: 2.7.2
See all available versions with `rbenv install --list'.
If the version you need is missing, try upgrading ruby-build:
brew update && brew upgrade ruby-build
So I tried following the instructions above and get this
brew update && brew upgrade ruby-build
Already up-to-date.
Warning: ruby-build 20200926 already installed
You need to install the latest ruby-build
$ brew unlink ruby-build # remove STABLE version
$ brew install --HEAD ruby-build
$ rbenv install -l | grep '2.7.2'
2.7.2
Only latest stable releases for each Ruby implementation are shown.
Use 'rbenv install --list-all' to show all local versions.
The answer from #andrei-kovrov is correct but, alternatively, you can wait until this PR gets merged:
https://github.com/Homebrew/homebrew-core/pull/62096
Btw, this answer will not age well so, for reference, this is where the formulae are staged before they get released:
https://github.com/Homebrew/homebrew-core/pulls
It might be an issue reading the correct version of ruby based on the path that is specified. If you already have another version of ruby installed the path might not be updated to look for a newer version.
This article has a lot of really great information on how to set up ruby on a mac:
https://stackify.com/install-ruby-on-your-mac-everything-you-need-to-get-going/

brew install hadoop installing 2.8.1 version. But needed 2.7.4 version

I have Homebrew 1.3.1
I want to install hadoop 2.7 but brew is installing hadoop 2.8 version.
I tried
brew versions, which is not available anymore.
brew tap homebrew/version, which is now deprecated.
In previous brew version, we were able to use brew tap homebrew/boneyard and then brew versions work. But, now even from homebrew/boneyard the versions command is removed.
Would we good to know the direct command for homebrew to run and install hadoop 2.7.4
(#bfontaine its not a duplicate question as that answer is 6 years ago and no longer works)
You can try running
brew list --versions hadoop
to see if you have previous versions and you can switch to it by running
brew switch hadoop 2.7.4
There is
brew install <package_name>#<version>
Unfortunately it seems hadoop and many other packages haven't set it up to be possible to download the older version and I haven't found out a way to do it.
As I am writing this, there is a version 2.7.7 of hadoop here: https://dist.apache.org/repos/dist/release/hadoop/common/
You can use 'brew edit hadoop' to refer to that version directly, and then run 'brew install hadoop'.

rbenv install --list does not list version 2.1.2

I installed rbenv via Homebrew on an OS X 10.9.3 MacBook Pro:
brew update
brew upgrade rbenv ruby-build
According to rbenv install --list on my laptop Ruby 2.1.0-dev is the latest.
Both rbenv and ruby-build are generally installed from Github by cloning; That's how the authors recommend we install it.
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
If you didn't do it that way I'd recommend that method. Then, you can simply do:
cd ~/.rbenv
git pull
cd plugins/ruby-build
git pull
If you have several plugins use:
cd plugins
for i in *
do
cd $i
git pull
cd -
done
I update every couple weeks just to pull in the latest fixes/changes.
I faced the same issue. I got the latest by running the following command:
brew upgrade --HEAD ruby-build
I had this issue on OS X 10.8.5 (so don't think OS related). I had tried updating rbenv & ruby-build via brew. 2.1.0-dev was still latest build available.
I had to force uninstall and re-install ruby-build via brew to fix the issue.
brew uninstall ruby-build --force
brew install ruby-build
I had the same issue. Even after running
brew upgrade rbenv ruby-build
I still didn't get ruby-2.1.2 on the available list.
Following how to update list of available ruby versions on linux, I updated ruby-build through the following commands
cd ~/.rbenv/plugins/ruby-build
git pull
(I'm using OS X 10.9.4 MacBook Air)
This happened to me today. "rbenv install -l' displays outdated list while "ruby-build --definitions" returns the correct list. The problem is fixed by executing following command:
rm -Rf ~/.rbenv/plugins/ruby-build
It seems there is an outdated version of ruby-build under ~/.rbenv/plugins. Not sure when it got generated.
This link
gives a good explanation of the two available options.
If you installed rbenv from the git repository:
$ cd ~/.rbenv/plugins/ruby-build
$ git pull
If you used Homebrew on OSX to install rbenv:
$ brew update
$ brew upgrade ruby-build
(Also running brew doctor might give you the exact solution.)
And if you have permission denied errors, this is my addition:
$ sudo chown -R $USER /usr/local; brew update
$ sudo chown -R $USER /usr/local; brew upgrade ruby-build
Then you'll be able to install the recent versions.
$ rbenv install --list
$ rbenv install 2.1.2
The selected answer will work fine, but the issue may have simply been caused by homebrew not having an up-to-date formula for ruby-build at the time. As of this posting, the appropriate ruby-build formula has been put into the latest version of homebrew. So running:
$ brew update
should get you version needed to get the latest ruby. Then, running rbenv install --list again should list 2.1.2 (and others).
So if anyone sees this later on, hopefully you can avoid having to maintain the individual repositories if you'd rather use homebrew for package management.
I've just updated ruby-build and ruby-install to latest versions and both have the latest ruby 2.1.2
Probably rbenv doing something nasty.
Following all the above, on OSX 10.11 it still wouldn't list the latest versions. What I did below worked for me- I removed the dir, re-installed from brew then I had to link in brew like this:
$ brew uninstall ruby-build --force
$ rm -Rf ~/.rbenv/plugins/ruby-build
and then
$ brew install ruby-build
$ brew link --overwrite ruby-build
and then I saw the most recent versions to build.
cd /home/[user]/.rbenv/plugins/ruby-build && git pull && cd -
Don't forget to replace [user] with your user

How to upgrade mongodb from 2.0 to 2.2 in mac osx

There are no instructions that I can find on the mongodb website on how to install 2.2 when you already have 2.0 using brew. I can see versions using "brew versions mongodb" but when I try to install one it says "mongodb does not have a version "2.2.0-x86_64" in the Cellar."
The versions command shows:
new-host-4:~ scott$ brew versions mongodb
2.2.0-x86_64 git checkout 34fb67d /usr/local/Library/Formula/mongodb.rb
2.0.7-x86_64 git checkout 6434ebb /usr/local/Library/Formula/mongodb.rb
2.0.6-x86_64 git checkout 2553479 /usr/local/Library/Formula/mongodb.rb
...
I know it's only a few lines of magic but I don't know the proper incantation.
All I had to do was the following...
$ brew update
$ brew upgrade mongodb

Resources