I'm trying to upgrade pyenv with homebrew for getting new Python releases.
Here is the problem:
$ brew upgrade pyenv
Error: pyenv 1.2.7 already installed
Is there a kind of update latency in homebrew package versioning? I am aware of the existence of other ways to install pyenv, but I'd like to use homebrew.
pyenv 1.2.8 is not yet officially released.
On the master branch the last tag is 1.2.7.
The commit you mentioned in your question is in preparation for release 1.2.8.
Version 1.2.7 is here https://github.com/pyenv/pyenv/tree/v1.2.7
Version 1.2.8 should be here https://github.com/pyenv/pyenv/tree/v1.2.8 but nothing is there (yet).
Verify which pyenv your system is using.
I thought I had this issue but then realized I had two different installs on my computer and my system was not actually using the brew installed pyenv --version.
Grepping my shell history, I saw that at some point I installed pyenv with curl using pyenv-installer for some reason. The command I found in my history was curl https://pyenv.run | bash. I followed the pyenv-installer directions to uninstall. Make sure to restart your shell once you uninstall!
I then reinstalled pyenv with brew. brew reinstall pyenv though I'm not sure if that's necessary.
I now see the newer versions of python available for install with pyenv install --list
Related
Today(2020/10/27) I want to upgrade my dart to version 2.10.2, then I use this command:
~ ⌚ 9:58:16
$ brew upgrade dart
Warning: dart-lang/dart/dart 2.9.3 already installed
why could not upgrade to 2.10.2? must I install dart from sources?
You have to run the command brew update before you upgrade with brew upgrade. What the upgrade command does is refresh the list of packages, their versions, and where to download. In other words, it runs git pull for each tap you've tapped, and the core tap. It's also similar to sudo apt-get update on linux systems with apt. In short, just run brew update && brew upgrade dart and it should work. If that doesn't work for some people, it might be that you have to install from source to get this version, as the question pointed out.
I know how to install Homebrew like in https://brew.sh/. It always installs the latest version of homebrew (current version is 2.0.2). I find some incompatibilities between the current and 1.x.
How can I install 1.x version of homebrew?
Thanks.
Although I don't recommend this, but you should be able to just checkout the old version of Homebrew in Homebrew directory.
# install new Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Go to Homebrew folder
cd /usr/local/Homebrew
# Checkout old version
git checkout 1.0.0
What's the incompatibility you are talking about? I think it is easier to solve your incompatibility than use an old version of Homebrew.
I've noticed this happening a few times but this most recent instance is with wp-cli Running brew upgrade wp-cli does not download the latest version.
$ brew upgrade wp-cli
Error: homebrew/php/wp-cli 0.20.1 already installed
$ brew info wp-cli
homebrew/php/wp-cli: stable 0.20.1, HEAD
A set of command-line tools for managing WordPress installations.
http://wp-cli.org/
/usr/local/Cellar/wp-cli/0.20.1 (2635 files, 15M) *
Built from source
From: https://github.com/Homebrew/homebrew-php/blob/master/Formula/wp-cli.rb
Note the version is 0.20.1. When I check the formula repo, I see,
head "https://github.com/wp-cli/wp-cli.git"
When I check that repo, I see that the version in the master branch is 0.24.0. brew info and wp --version both return 0.20.1. Why isnt Homebrew grabbing the latest version? How do I force it to get the latest?
You'll need to run brew update first to force brew to update its list of formulae.
How does homebrew/cask's updates work if the app auto updates itself.
Example: Chrome or Firefox
These two apps auto update themselves.
But what happens when you run a brew update?
Does it detect that it is already updated or does it check an internal list of apps it installed (misses that it is already updated) and reupdates the app>
brew cask upgrade is possible as of version 1.3.9
The Homebrew Cask repository is technically a Homebrew Tap.
This means:
It will pull down the latest Casks every time you issue the Homebrew command brew update
You can check for outdated Casks with brew cask outdated and install the outdated Casks with brew cask upgrade
Most importantly for this question, applications that update themselves include auto_updates true. This means that these casks are ignored by brew cask outdated and brew cask upgrade. This can be overridden by adding --greedy to the command.
See the Firefox cask as an example:
url "https://download-installer.cdn.mozilla.net/pub/firefox/releases/#{version}/mac/#{language}/Firefox%20#{version}.dmg"
appcast 'https://www.macupdater.net/cgi-bin/check_urls/check_url_redirect.cgi?url=https://download.mozilla.org/%3Fproduct=firefox-latest-ssl%26os=osx'
name 'Mozilla Firefox'
homepage 'https://www.mozilla.org/firefox/'
auto_updates true
Further reference is here.
Homebrew doesn't follow a new version of cask apps automatically, and you can leave such apps to their own auto updates as Homebrew intends to leave it to their own upgrade systems and e.g.
brew upgrade google-chrome
does nothing even when google-chrome has got a new update.
N.B. Now with Homebrew 2.5.5, brew cask was deprecated and integrated to the normal brew.
If you want to do for cask explicitly, you may want --cask
brew upgrade --cask google-chrome
but all the same basically.
Should you want to follow the latest version on your Homebrew proper, you can run such a command as
brew upgrade --greedy google-chrome
Also you can check a diff between the latest and your local with
brew upgrade --greedy --dry-run google-chrome
This way however is mostly for cask apps without their own upgrade systems and you don't need these commands for those with the upgrade systems as long as you're not concerned about your version numbers on Homebrew.
No. There is no brew cask upgrade.
So I tried to install it according to the directions on couchdb wiki. and I get the following issue
Installing couchdb dependency: erlang-r15
==> Downloading https://github.com/erlang/otp/archive/OTP_R15B03-1.tar.gz
Already downloaded: /Library/Caches/Homebrew/erlang-r15-R15B03-1.tar.gz
Error: SHA1 mismatch
Expected: 5ba866722de79956b06966c232490d32bb7ba0a6
Actual: 7843070f5d325f95ef13022fc416b22b6b14120d
Archive: /Library/Caches/Homebrew/erlang-r15-R15B03-1.tar.gz
Is there anyway to tell brew to skip this dependency since I have already installed the correct version of erlang, and it can't see it?
Did you try brew uninstall couchdb and re install after?
I had the same issue, it fixed it for me
So to get this working I followed the instruction on the couchdb until the install couchdb command:
brew remove --force openssl erlang couchdb icu4c spidermonkey nspr
brew update
brew outdated
brew rm --force erlang
cd /usr/local
git checkout 168742f Library/Formula/erlang.rb
brew install erlang
since I knew I had the right erlang installed I altered the Bew formula to make it work correctly.
So I headed over to the formula at
vim /usr/local/Library/Formula/couchdb.rb
And altered the dependency line
depends_on 'erlang-15'
to
depends_on 'erlang'
and works great now!!
None of the solutions here worked for me, but the below did. Note, I had to build with unixodbc.
brew remove --force openssl erlang couchdb icu4c spidermonkey
brew update
brew install unixodbc
brew install homebrew/versions/erlang-r15 --with-unixodbc
# edit /usr/local/Library/Formula/couchdb.rb to change depends_on to 'erlang-r15'
brew install couchdb
You may want to first try force removing only erlang and couchdb -- as someone in this thread mentioned that force removing packages messed up his system (though I did not encounter this problem when running the above instructions).