How do I downgrade from Yarn2 to Yarn1? - yarnpkg

I'm using macOS and after installing Yarn2 several important tools no longer function. I've logged issues with them but in the meantime I need to get back to Yarn Classic. brew uninstall yarn and then tried brew install yarn#1.22.5 but this failed with an unknown version error message.

Trick is to check for a ~/.yarnrc.yml file and if present remove any line for the yarnPath variable.

Related

bash: /home/linuxbrew/.linuxbrew/bin/go: Bad address

I did an brew upgrade and afterwards keep getting an bad address error.
Tried to uninstall/reinstall everything, but cant figure out what is the problem.
bash: /home/linuxbrew/.linuxbrew/bin/go: Bad address
Im new to terminal and linux, so all advice is welcome.
I tried brew doctor. It says "No developer tools installed." and after i 'brew install gcc' it says gcc is already installed and up-to-date.
Use the official Go installation:
Go: Download and install
For full support, avoid OS package managers, Homebrew, and so forth.
First, remove any previous installations by other methods, for example, Homebrew.
Little late, but this post was a suggestion for me when I ran into a similar issue with Go and Brew.
When Brew updates the version of Go (1.19.3 -> 1.19.5 in my case) that it is providing, for some reason it does not correctly update the GOROOT environment varaible. Correcting the value of the variable fixed the issue for me.
export GOROOT=/home/linuxbrew/.linuxbrew/Cellar/go/<go_version>/libexec
# example
export GOROOT=/home/linuxbrew/.linuxbrew/Cellar/go/1.19.5/libexec

How to change Homebrew's prefix?

I'm using MACOS M1, and started to install brew under ARM. Then at the other day, I installed some formula under x86.
When I run a command
brew doctor
And I got this message
Some of Homebrew's bottles (binary packages) can only be used with the default
prefix (/usr/local).
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
unsupported configuration.
How to change the prefix to /usr/local/?
When I run which -a brew I got this result
/opt/homebrew/bin/brew
/usr/local/bin/brew
Thanks in advance.
I had the same issue because I did not installed the homebrew from the local path on my terminal.
I just uninstalled the homebrew, installed it again (from the local path this time) and it is fine now.
To uninstall Homebrew, run the uninstall script from the HomeBrew/install repository.

Homebrew Portable Ruby Error macOS 10.14.6

Homebrew suddenly stopped working, when i run any brew command i get following output:
==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
Already downloaded: /Users/<user>/Library/Caches/Homebrew/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
/usr/local/Homebrew/Library/Homebrew/cmd/vendor-install.sh: line 123: /usr/bin/cut: cannot execute binary file
Error: Checksum mismatch.
Expected: b065e5e3783954f3e65d8d3a6377ca51649bfcfa21b356b0dd70490f74c6bd86
Actual:
Archive: /Users/<user>/Library/Caches/Homebrew/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
To retry an incomplete download, remove the file above.
Error: Failed to upgrade Homebrew Portable Ruby!
I already tried to remove the file portable-ruby-2.6.3_2.yosemite.bottle.tar.gz but it doesn't work and i couldn't find any helpful information about this error on Google.
Any help is appreciated.
There are several things that I can think of for your situation.
Your output has yosemite identifier, to be clear, MacOS Yosemite is actually 10.10.x, it is not in the current/latest homebrew support list, and also different from 10.14 Mojave in your problem title. So if you are actually using Mojave, you can keep your brew up to date and reinstall ruby.
The latest Ruby formula is actually 2.7.x, you might want to reinstall/upgrade (brew reinstall ruby/brew upgrade ruby).
In all, if you still run into an issue, please attach the outputs of brew config and brew doctor for troubleshooting.
Try brew update-reset and then try brew upgrade.
It's set portable-ruby-2.6.3_2.yosemite.bottle.tar.gz was already downloaded so I removed it and it went through henceforth.

Tex error occurred while upgrading octave with brew

I first installed octave through brew with the instruction on the office website. One day when I entered brew update && brew upgrade, octave started to upgrade but one error occurred said
You don't have a working TeX binary (tex) installed anywhere in your
PATH, and texi2dvi cannot proceed without one. If you want to use this
script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do). See the --help
output for more details.
So I entered brew cask install mactex to install tex and added the Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin to the PATH, when I run tex, it correctly processed:
terminal screenshot
Then I run brew upgrade but the same error occurred again.
I realized that the --without-docs argument may fix this problem but if I want to install docs (since I have already installed tex) what should I do?
I had similar problem while installing another program (not octave) and after looking around I found that I needed to install TeTex (http://www.tug.org/teTeX/) or TexLive, however I decided to install TexLive because TeTex is not mantained anymore...
For me it worked after installing Texlive on the basic configuration. You can follow the instructions over here:
http://www.tug.org/texlive/quickinstall.html

Problems with Cocoapods on Xcode 6.4

I'm trying to install and use Cocoapods with Xcode. I've installed already Brew, so I've used this command:
sudo gem install cocoapods
but it stays there, without response and without asking me for password (that's really strange, because of sudo command).
Maybe I got some problem with Brew Installation or Ruby on my Yosemite iMac?
I met the same error in the past, there is something wrong with my development environment. I re-install the Command Line Tools follow this guide, then everything is ok.
You can get the detail information from here, hope it can help you.

Resources