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.
Related
I installed the newest release of telepresence by
brew install datawire/blackbird/telepresence
However my scripts are using some legacy telepresence commands that are no longer supported -
The following flags used don't have a direct translation to Telepresence: --serviceaccount --also-proxy --also-proxy --also-proxy --also-proxy
I have not been able to find a way to install an old version of telepresence on mac os.
My preference would to be to use brew but this does not look possible.
brew install telepresence-legacy
brew unlink telepresence
wget https://raw.githubusercontent.com/datawire/homebrew-blackbird/1797069a468a4b056edbfcaf63e9ac665470cdaf/Formula/telepresence.rb
brew install ./telepresence.rb
I found this here
installing-old-version-telepresence-macos/
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
I tried using
brew install yarn#1.7.0 --without-node
or
brew install yarn#1.7.x --without-node
But I get the following error
Error: No available formula with the name "yarn#1.7.0"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
I presume its possible to install different versions of yarn using brew ?
I had the same issue and wanted to install yarn via brew for various reasons. Honestly the only way is to use the actual link to the yarn.rb file in the Homebrew Repo for the version you want. The easiest way to find the .rb file through git is to check out the PRs in Git for yarn in the homebrew repo.
Before doing this though, run brew unlink yarn in order to allow an older version to be installed while keeping the newest version.
Then look up the PR of the version you want, here's a link to make your life easier.
Click the version you want and go to Files Changed tab. Click on View File button. Then click on Raw button and then copy the URL of this raw file
After you get that link, type in your terminal brew install [link] and you should be set
You can then use brew list --versions yarn to check your installed versions and brew switch to switch versions. You should have both the latest version you previously had installed and the version you just installed.
Some of the above answers don't seem to work anymore. Here is how I was able to install a specific version in April 2021:
brew unlink yarn#1.6.0 (If you already have a version installed)
brew extract --version 1.22.4 yarn homebrew/cask
brew install yarn#1.22.4
yarn -v
You can also use yvm, a yarn version manager instead of homebrew to install a specific or multiple versions of yarn
https://yvm.js.org/docs/overview
Enables easy switching between yarn versions, like nvm does for node
Hope this works for you guys.
To reinstall run below.
// Note:(updating homebrew) for Mac users.
brew install -g yarn
if yarn is still not found
brew reinstall yarn
As per official github page https://github.com/yarnpkg/yarn/issues/599 you should use "brew install -g yarn" to install yarn using brew.
PS: I've installed Xcode and gcc before running above command as i ran into few issues when executed above command.
You could also use yarn policies set-version <version>, but it has a caveat; it will "check in your Yarn release within your repository. Once you run it, your configuration will be updated in such a way that anyone running a Yarn command inside the project will always use the version you set - and this transparently."
You might not want to have the Yarn release in your repository.
Official doc
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.