When brew does not have latest package version - macos

How do I force brew to install latest version of neovim (ver 0.5.0) when brew's formula only has 0.4.3?
I have tried:
brew update
brew upgrade neovim
And it says: Warning: neovim 0.4.3 already installed
I went brew's git repo and checked on neovim formula. Brew has neovim's 0.4.3, not 0.5.0. So brew update/upgrade is not going to help. https://github.com/Homebrew/homebrew-core/blob/master/Formula/neovim.rb
I'm thinking of just downloading neovim from neovim repo and installing it manually, but I'm afraid I'll have to manage updates and dependencies if I do this manual install.
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz
tar xzf nvim-macos.tar.gz
./nvim-osx64/bin/nvim
What should I do?

I fixed this with the following steps:
1) Unlink old neovim version:
brew unlink neovim ... and 2)
Install pointing to head:
brew install --HEAD neovim
... This installed neovim 0.5.0.

According to the brew doc, brew install --HEAD will install the master branch of the package. For neovim, it means that the latest version of neovim will be built for you, which may not be stable enough or even compile.
I suggest you install the nightly binary version of neovim. The best way to get the nightly version is to download from the binary release. No dependency is required to install if you download the binary release.
If you don't want to do this manually, you can write a bash script to automate this.

Related

How to update cocoapod version using brew

I've installed cocoapods by this - https://apple.stackexchange.com/questions/418222/installing-cocoapods-to-macos-catalina/418230#418230
It istalled cocoapods v1.5.2. Now I want to update the version to the latest v1.10.0.
So I've used -
brew upgrade cocoapods
I've also tried this -
brew install cocoapods#1.10.0
But I'm getting -
Error: This command updates brew itself, and does not take formula names.
Use `brew upgrade cocoapods` instead.
Fahims-Mac-mini:~ fahimrahman$ brew upgrade cocoapods
Fahims-Mac-mini:~ fahimrahman$ brew upgrade cocoapods
Fahims-Mac-mini:~ fahimrahman$ brew install cocoapods#1.10.0
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "cocoapods#1.10.0".
==> 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.
Also tried this -
sudo gem install cocoapods
but still is not working on my device. So How can I update the cocoapods version using brew?
I had the same issue and resolved. This was bugging me, since in the website https://formulae.brew.sh/formula/cocoapods latest stable is 1.10.1 but still brew installed me1.5.4
Figure out The problem by using
brew doctor
I got the below warning.
Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
git -C $(brew --repo homebrew/core) checkout master
Then, as per suggestion, I did. (Fix the related issues which comes for you)
git -C $(brew --repo homebrew/core)
Then, brew install cocoapods installed the latest version for me.
Hope it solves.
You can't do much with homebrew.
Homebrew allows installing v1.10.1 only
In my case fix this issue by updating ruby to 2.7 to install cocoapods v1.10.0.
rvm install ruby-2.7
Note: Use the specific version of ruby as per your macOS compatibility
I uninstalled brew uninstall cocoapods then reinstalled by sudo gem install cocoapods , it worked.
For me brew upgrade cocoapods shows Warning: cocoapods 1.11.2_2 already installed, so I've unistalled them with brew uninstall cocoapods and the install again with brew install cocoapods and now pod --version shows 1.11.3
I used brew upgrade cocoapods and it works just fine. Take a look at these terminal screenshots. brew upgrade cocoapods
upgrading cocoapods

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/

Issues installing new ruby version using rbenv

I am trying to install ruby 2.5.0 on my system (macOS High Sierra) using rbenv but i'm facing a weird issue as the brew instructions are out of date:
djeustinezzz:~ JUSTINE$ rbenv install rbx-2.5.0
ERROR: Rubinius will not be able to compile using Apple's LLVM-based
build tools on OS X. You will need to install LLVM 3.5 first.
TO FIX THE PROBLEM: Install Homebrew's llvm package with this
command: brew tap homebrew/versions ; brew install llvm35
BUILD FAILED (OS X 10.13.6 using ruby-build 20160130)
The version 3.5 of LLVM was deleted. After googling here is what i've done:
brew tap homebrew/homebrew-core
brew install llvm#3.7
But nothing changed.
Homebrew, rbenv and ruby-build are installed and up-to-date.
Precision on why i'm doing this: i just installed Rails 5 on my computer and when i run the server, i have this error:
rbenv: version `ruby-2.5.0' is not installed (set by /Users/JUSTINE/desktop/code/test_five/.ruby-version)
When i run ruby -v, the output is ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17] .
Any idea?
Clone both rbenv and ruby-build using the below links
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
Now you'll have the ruby-build directory inside plugins.
cd ~/.rbenv
git pull
cd plugins/ruby-build
git pull
After this, you should 2.5.0 when you run rbenv install --list
So, what I'd do is try to see if you have the correct version of macOS command line tools installed. You could run:
xcode-select --install
Or you could start from scratch with:
rm -rf /Library/Developer/CommandLineTools
Then install the command line tools with the code above, or the better way which I found, was going directly to the Apple Developer site and downloading the command line tools package itself and installing that.
Install Command Line tools version 10.13 from here.
This issue also came up for me, but it came up when I started running Mojave. I believe it's the same thing here because I got the same errors.

How to install Qt 5.6.1-1 via homebrew?

When you run brew install qt5 you'll get the latest version (right now that's 5.7.0). A week ago or so, when I ran this command version 5.6.1-1 was installed.
Now I need to install this 5.6.1-1 version again on another machine. How can I do this via brew? (trying to avoid the long compile time)
A brew search qt5 doesn't show this previous release:
$ brew search qt5
pyqt5 qt5 ✔
homebrew/versions/qt52 homebrew/versions/qt55
The qt5 formula resides here, in Github and by backtracking to a previous commit you can find a previous version of the formula. The 5.6.1-1 version can be found here.
So to install Qt 5.6.1-1 with Homebrew you can do this:
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/fdfc724dd532345f5c6cdf47dc43e99654e6a5fd/Formula/qt5.rb
brew install ./qt5.rb
brew install qt#5
From the other versions section of https://formulae.brew.sh/formula/qt

SVN using wrong sqlite version

when running my svn from /usr/local/bin/ it says:
svn: E200029: Couldn't perform atomic initialization
svn: E200030: SQLite compiled for 3.7.13, but running with 3.6.12
sqlite3 --version gives me 3.7.13
What went wrong and how can I fix it?
I'm on Mac OS X (10.6.8).
//edit1:
/usr/local/bin/sqlite3 --version 3.7.13
/usr/bin/sqlite3 --version 3.7.13
//edit2: I "fixed" this by installing svn via homebrew and using /usr/local/bin/svn explicitly
Let me sum up the fixes and suggestion from the answers below:
(please upvote the corresponding answer)
For Mac users:
(re-)install svn via homebrew or whatever you use (you may need to brew link --force sqlite3)
For Fedora users:
try yum update sqlite3 or yum install sqlite
I experienced the same issue, I solved downloading http://www.sqlite.org/sqlite-amalgamation-3.7.6.3.tar.gz, unpacking the archive using tar/gunzip and coping sqlite3.c from the resulting directory into $svn-src-folder/sqlite-amalgamation/sqlite3.c.
Run configure/make/sudo make install and you should solve.
I had brew, svn 1.8, working fine in OSX 10.8.
I upgraded to 10.9, broke. For some reason the symlinks brew makes in /usr/local/bin were removed by the 10.9 installation?
brew update didnt fix.
brew install svn fixed svn, or so I thought.
Then actually using svn 1.8 (/usr/local/bin first in my path) I also had the above sqlite error message. A newer sqlite being in /usr/local/Cellar, but not symlinked in /usr/local/bin or anything.
brew install sqlite3 ... didnt fix it. And I noticed brew says for this component it doesnt symlink. ok.
BUT, after that reinstall, a further reinstall of svn
brew svn uninstall
brew svn install
DID fix it. dont know why. Now can svn co successfully.
After re-linking subversion, I had also to re-link sqlite3
brew link --force sqlite3
It means subversion was compiled with SQLite version 3.7.13, but now you are running SQLite 3.6.12.
All you need to do is recompile/reinstall your subversion again.
update sqlite3!!
I had similar issue on Fedora Core 20
Did the following:
yum update sqlite3
For me, yum install sqlite in fedora fixed the problem.

Resources