I am trying to switch versions of elm, as installed by homebrew.
elm --version
0.18.0
brew switch elm 0.16.0
Cleaning /usr/local/Cellar/elm/0.16.0
Cleaning /usr/local/Cellar/elm/0.18.0
7 links created for /usr/local/Cellar/elm/0.16.0/
brew prune
brew link elm
elm --version
-bash: /usr/local/bin/elm: Permission denied
File permissions of the folders containing 0.16.0 and 0.17.0:
drwxr-xr-x# 5 my.name admin 170B 10 Feb 09:53 0.16.0/
drwxr-xr-x 7 my.name admin 238B 10 Feb 09:52 0.18.0/
If I switch back to 0.18.0, everything works correctly:
brew switch elm 0.18.0
Cleaning /usr/local/Cellar/elm/0.16.0
Cleaning /usr/local/Cellar/elm/0.18.0
6 links created for /usr/local/Cellar/elm/0.18.0
brew prune
brew link elm
Warning: Already linked: /usr/local/Cellar/elm/0.18.0
To relink: brew unlink elm && brew link elm
elm --version
0.18.0
There is also a tool like nvm (node version manager) for switching elm versions. Here https://github.com/rtfeldman/elm-use you can read more info about it.
You can easily install it with
npm install -g elm-use
Then you can do elm-use 0.17 or whatever version you want to use
It seems npm is best for installing elm.
brew uninstall elm
npm install elm#0.16.0
Done
Related
Using electron-builder to build Windows app, When signing up, I got this error :
dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /Users/puss/Library/Caches/electron-builder/winCodeSign/winCodeSign-1.7.0/darwin/osslsigncode
Reason: image not found
If you are in MacOS 10.15 (Catalina), try this (reinstall openssl):
brew update && brew upgrade
brew uninstall openssl
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
I try to uninstall openssl and reinstall openssl, It worked.
brew remove openssl
brew install openssl
Just switch to 1.0.2t version, using this command:
brew switch openssl 1.0.2t
For me, re-installing openssh (not openssl) was the only solution.
brew remove openssh
brew install openssh
Thanks unifreak, I fixed this problem on macOS v10.11.6 at Tue Apr 28 2020 again.
REF: https://stackoverflow.com/a/59224109/686105
Update homebrew index and upgrade. (option)
[ chusiang#osx_el_capitan ~ ]
$ brew update && brew upgrade
Try to remove the openssl#1.1.
[ chusiang#osx_el_capitan ~ ]
$ brew uninstall openssl#1.1
Error: Refusing to uninstall /usr/local/Cellar/openssl#1.1/1.1.1g
because it is required by ansible-lint, atk, cairo, gdk-pixbuf, glib, gnupg, gnutls, gobject-introspection, gsettings-desktop-schemas, gtk+3, gtk-doc, harfbuzz, ipmitool, ipython, irssi, itstool, krb5, libevent, libfido2, libpq, libssh, libssh2, libxml2, macvim, meson, nmap, openssh, pango, pgcli, postgresql, python, python#2, python#3.8, ruby, rust, s3cmd, sdcv, sphinx-doc, sshuttle, tcpdump, tmate, tmux, travis, unbound, vim, w3m, wget and zenity, which are currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies openssl#1.1
Remove the openssl#1.1 with --ignore-dependencies args.
[ chusiang#osx_el_capitan ~ ]
$ brew uninstall --ignore-dependencies openssl#1.1
Uninstalling /usr/local/Cellar/openssl#1.1/1.1.1g... (8,052 files, 18.4MB)
Install the specific version of openssl v1.0.0.
[ chusiang#osx_el_capitan ~ ]
$ brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
Lock the openssl version with v1.0.0.
[ chusiang#osx_el_capitan ~ ]
$ brew pin https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
Add this openssl into $PATH.
[ chusiang#osx_el_capitan ~ ]
$ echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
Apply this change of $PATH.
[ chusiang#osx_el_capitan ~ ]
$ source ~/.bash_profile
DONE.
[ chusiang#osx_el_capitan ~ ]
$ openssl version
OpenSSL 1.0.2t 10 Sep 2019
Finally, the ssh / git / ansible were back !
Here's what worked for me
brew update && brew upgrade
brew uninstall --ignore-dependencies openssl
brew install openssl
I had the same problem. In my case, for a legacy Rails 2.4 app. It seems brew had updated /usr/local/opt/openssl to symlink to openssl#1.1/1.1.1d.
After trying several other things, I fixed it by manually updating the symlink /usr/local/opt/openssl to point to the 1.0.2s version that was already on my system:
MacBook-Pro/usr/local/opt(:|✔) % pwd
/usr/local/opt
MacBook-Pro/usr/local/opt(:|✔) % ll openssl*
lrwxr-xr-x 1 dhempy admin 24 Feb 19 11:36 openssl -> ../Cellar/openssl/1.0.2s
lrwxr-xr-x 1 dhempy admin 28 Feb 19 08:55 openssl#1.1 -> ../Cellar/openssl#1.1/1.1.1d
Hopefully this is one-and-done for me, and I won't have to reapply that symlink after every update.
brew doctor gave me the following warning:
Warning: Some installed formulae are missing dependencies.
You should `brew install` the missing dependencies:
brew install openssl#1.1
this command fixed my issue
brew install openssl#1.1
Reinstalling watchman with brew solved the issue for me :
brew remove watchman
brew install watchman
I hope it helps,
This is the process I had to use to fix this issue. I am not sure how to use brew extract correctly.
We need openssl in order to use wget.
brew install openssl
Now, download version 1.0.2t and install it.
wget https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
brew install openssl.rb
If you are using a conda env, simply use
conda install -c bioconda samtools openssl=1.0
I had to run these commands because my problematic package appeared to be ldns:
brew uninstall --ignore-dependencies ldns
brew install ldns
I tried each and every one of these answers and still was getting the error from question.
Solution was to:
brew uninstall --ignore-dependencies openssl#<any&all brew ssl versions>
remove the files manually from /usr/local/etc (the locations of these are listed after step 1)
remedy the $PATH error: aka tell ssh command where it should be looking, by adding export PATH=/bin:/usr/bin:/usr/local/bin to ~/.zshrc or ~/.profile or ~/.bashrc depending on what shell you use.
hope this helps someone.
I´m having problems with the brew versions command, I´m trying to run
brew versions grails
Error: Unknown command: versions
which brew 127 ↵
/usr/local/bin/brew
brew -v
Homebrew 0.9.5
Try this first:
brew tap homebrew/boneyard
as versions option is obsolete.
UPDATE: they've started putting multiple versions in homebrew-core (see the message here), so now you'll see it by default:
$ brew update
$ brew search grails
grails grails#2.5
Info about the deprecated "homebrew/versions":
The versions command was obsoleted in favor of homebrew-versions, which is a separate tap with formulas pointing to specific versions of packages. You can add it with brew tap homebrew/versions and brew update, then you'll see specific versions from the tap like this:
$ brew search grails
grails homebrew/versions/grails20 homebrew/versions/grails22
homebrew/versions/grails224 homebrew/versions/grails13 homebrew/versions/grails21
homebrew/versions/grails223 homebrew/versions/grails23
$ brew install homebrew/versions/grails223
You can also look at the git commit log from the regular tap and pick a version that way:
$ brew log grails
commit eeacedb303093999c60d5696e3385213021dc1eb
Author: Christian-Manuel Butzke <chris#fruwe.com>
Date: Wed Jan 27 10:28:42 2016 +0900
grails 3.0.12
Closes #48501.
Signed-off-by: Martin Afanasjew <martin#afanasjew.de>
commit bbdbbe29827d77e5f530d804a07e9985f74d8cbe
Author: Xu Cheng <xucheng#me.com>
. . .
$ cd $(brew --prefix)
$ git checkout bbdbbe29827d77e5f530d804a07e9985f74d8cbe Library/Formula/grails.rb
$ brew install grails
When I ran brew tap homebrew/boneyard and then brew versions node I got the following, which looks like the proper replacement:
You should use the homebrew-versions tap instead:
https://github.com/Homebrew/homebrew-versions
Cheers!
I'm trying to install wxWidgets on Mac OS X 10.9. It's already installed, but I'm having the problem described here. Someone suggested to add ENV.append_to_cflags "-stdlib=libc++". I did, but I'm not able to recompile the code.
$ brew install wxmac
Warning: wxmac-3.0.0 already installed
$ brew edit wxmac
=> ok, modifications done, now I want to recompile and reinstall
$ brew uninstall wxmac
Uninstalling /usr/local/Cellar/wxmac/3.0.0...
$ brew install wxmac
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/wxmac- 3.0.0.mavericks.bottle.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/wxmac-3.0.0.mavericks.bottle.2.tar.gz
==> Pouring wxmac-3.0.0.mavericks.bottle.2.tar.gz
🍺 /usr/local/Cellar/wxmac/3.0.0: 775 files, 41M
How can I force homebrew to recompile?
Homebrew is installing wxmac in bottle form (a pre-compiled binary of wxmac). To build from source, add the --build-from-source flag when calling brew install:
$ brew install --build-from-source wxmac
To rebuild all installed FORMULAE from source:
$ brew list | xargs brew reinstall --build-from-source
I have a few kegs of the same package in /usr/local/Cellar/libfoo like /usr/local/Cellar/libfoo/1.0.1, /usr/local/Cellar/libfoo/HEAD and /usr/local/Cellar/libfoo/mycopy
How can I brew link to a specific version?
This is probably the best way as of 11.1.2022:
To install a specific version, e.g. postgresql 9.5 you simply run:
$ brew install postgresql#9.5
To list the available versions run a search with #:
$ brew search postgresql#
==> Formulae
postgresql postgresql#11 postgresql#13 postgresql#9.5 qt-postgresql
postgresql#10 postgresql#12 postgresql#9.4 postgresql#9.6 postgrest
==> Casks
navicat-for-postgresql
DEPRECATED in Homebrew 2.6.0 (December 2020):
The usage info:
Usage: brew switch <formula> <version>
Example:
brew switch mysql 5.5.29
You can find the versions installed on your system with info.
brew info mysql
And to see the available versions to install, you can provide a dud version number, as brew will helpfully respond with the available version numbers:
brew switch mysql 0
Update (15.10.2014):
The brew versions command has been removed from brew, but, if you do wish to use this command first run brew tap homebrew/boneyard.
The recommended way to install an old version is to install from the homebrew/versions repo as follows:
$ brew tap homebrew/versions
$ brew install mysql55
For detailed info on all the ways to install an older version of a formula read this answer.
Sadly brew switch is deprecated in Homebrew 2.6.0 (December 2020)
$ brew switch
Error: Unknown command: switch
TLDR, to switch to package version 10:
brew unlink package
brew link package#10
To use another version of a package, for example node:
First, ensure that the specific version is installed using brew list. My package here is node (16) and node#14.
➜ ~ brew list
==> Formulae
node
node#14
➜ ~ node -v
v16.1.0
Unlink the current package: brew unlink node.
➜ ~ brew unlink node
Unlinking /usr/local/Cellar/node/16.1.0... 7 symlinks removed.
Link the correct version
➜ ~ brew link node#14
Linking /usr/local/Cellar/node#14/14.16.1_1... 3857 symlinks created.
If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/usr/local/opt/node#14/bin:$PATH"' >> ~/.zshrc
➜ ~ node -v
v14.16.1
Homebrew removed brew switch subcommand in Homebrew 2.6.0. Get it back from here.
brew tap laggardkernel/tap
brew switch --help
name#version formula
There's mainly two ways to switch to an old version of an app.
If it's a bigger version change. Homebrew may have created a versioned package in the repo. Like go, go#1.10, they are two different formulae, installed into two different locations.
# install the old one
brew install go#1.10
# link the executable into /usr/local/bin, or /opt/homebrew/bin
brew link --overwrite --force go#1.10
brew switch
But not every package has a versioned variant. If you just upgraded to the new version and the old one is still in your system, skip step 1, 2.
In this situation, search in the homebrew-core repo and download the specific formula. e.g. mysql 8.0.23
Download the raw file, and install from it brew install /path/to/downloaded/mysql.rb.
Now both the latest and the old 8.0.23 (same formula mysql) exist, switch (link out) the old version with brew switch mysql 8.0.23
brew info mysql will list all the old version still exist.
Step 1, 2 could be replaced by brew extract, but that requires user maintain its own tap. I won't cover it here, just search it if you're interested.
If you have installed, for example, php 5.4 it could be switched in the following way to php 5.5:
$ php --version
PHP 5.4.32 (cli) (built: Aug 26 2014 15:14:01)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
$ brew unlink php54
$ brew switch php55 5.5.16
$ php --version
PHP 5.5.16 (cli) (built: Sep 9 2014 14:27:18)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
brew switch libfoo mycopy
You can use brew switch to switch between versions of the same package, if it's installed as versioned subdirectories under Cellar/<packagename>/
This will list versions installed ( for example I had Cellar/sdl2/2.0.3, I've compiled into Cellar/sdl2/2.0.4)
brew info sdl2
Then to switch between them
brew switch sdl2 2.0.4
brew info
Info now shows * next to the 2.0.4
To install under Cellar/<packagename>/<version> from source you can do for example
cd ~/somewhere/src/foo-2.0.4
./configure --prefix $(brew --Cellar)/foo/2.0.4
make
check where it gets installed with
make install -n
if all looks correct
make install
Then from cd $(brew --Cellar) do the switch between version.
I'm using brew version 0.9.5
In case brew switch produces an error (in this example trying to switch to node version 14):
> brew switch node 14
Error: Calling `brew switch` is disabled! Use `brew link` #-versioned formulae instead.
The correct way switching versions would be :
> brew link --overwrite node#14
if #simon's answer is not working in some of the mac's please follow the below process.
If you have already installed swiftgen using the following commands:
$ brew update
$ brew install swiftgen
then follow the steps below in order to run swiftgen with older version.
Step 1: brew uninstall swiftgen
Step 2: Navigate to: https://github.com/SwiftGen/SwiftGen/releases
and download the swiftgen with version: swiftgen-4.2.0.zip.
Unzip the package in any of the directories.
Step 3:
Execute the following in a terminal:
$ mkdir -p ~/dependencies/swiftgen
$ cp -R ~/<your_directory_name>/swiftgen-4.2.0/ ~/dependencies/swiftgen
$ cd /usr/local/bin
$ ln -s ~/dependencies/swiftgen/bin/swiftgen swiftgen
$ mkdir ~/Library/Application\ Support/SwiftGen
$ ln -s ~/dependencies/swiftgen/templates/ ~/Library/Application\ Support/SwiftGen/
$ swiftgen --version
You should get: SwiftGen v0.0 (Stencil v0.8.0, StencilSwiftKit v1.0.0, SwiftGenKit v1.0.1)
$ brew doctor
Warning: Your Homebrew is outdated
You haven't updated for at least 24 hours, this is a long time in brewland!
Then:
$ brew update
$ brew --config
HOMEBREW_VERSION: 0.9
HEAD: (none)
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3.2
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2335
Clang: 2.1 build 163
MacPorts or Fink? false
X11: /usr/X11
System Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Which Perl: /usr/bin/perl
Which Python: /usr/local/bin/python => /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
Which Ruby: /Users/luis/.rvm/rubies/ruby-1.9.2-p318/bin/ruby
This happend in my other mac and I when I brew upgrade brew outdated nothing happened.
I am afraid this will do the same even dough is a new installation.
how can I fix this?
Instead of using brew upgrade did you tried using brew update. It solved the problem for me.
There are differences between brew update and brew upgrade
brew update
Updates your local database of available (and no longer available) installable packages otherwise know in brew terminology as Formulae.
brew upgrade
Updates all the installed packages on your system currently. E.g. Upgrading PHP 5.3.20 to 5.3.21.
I don't see an error after you try to update, if you update and then run brew doctor again and it doesn't show the out of date error anymore then you are fully up to date.