xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

macOS brew uninstall node.js All In One

macOS brew uninstall node.js All In One

brew error

$ which node
/usr/local/bin/node

$ brew uninstall node@12.14.8 --force
Traceback (most recent call last):
	11: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `<main>'
	10: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require_relative'
	 9: from /usr/local/Homebrew/Library/Homebrew/global.rb:29:in `<top (required)>'
	 8: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 7: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	 6: from /usr/local/Homebrew/Library/Homebrew/os.rb:3:in `<top (required)>'
	 5: from /usr/local/Homebrew/Library/Homebrew/os.rb:21:in `<module:OS>'
	 4: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:58:in `prerelease?'
	 3: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `version'
	 2: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `new'
	 1: from /usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:26:in `initialize'
/usr/local/Homebrew/Library/Homebrew/version.rb:368:in `initialize': Version value must be a string; got a NilClass () (TypeError)

https://github.com/Homebrew/brew/issues/14135

??? Internet coonect error, need VPN in China❓

https://github.com/orgs/Homebrew/discussions/666

how to uninstall brew on macOS

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh

https://docs.brew.sh/FAQ#how-do-i-uninstall-homebrew

https://github.com/homebrew/install#uninstall-homebrew

https://appuals.com/install-and-uninstall-homebrew-on-macos/

#/usr/local/bin/node

$ open /usr/local

image

solutions

  1. re-install brew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh

https://brew.sh/

https://github.com/Homebrew/brew

re-try

$  brew uninstall node@12.14.8 --force

  1. manually remove
# /usr/local/bin/node
$  cd /usr/local/bin

$ rf -rm node

pbcopy bug

#  不好使 bug ❓
$ man brew | pbcopy

image

https://github.com/xgqfrms/ssr-next/issues/5

brew docs

https://docs.brew.sh/

$ man brew

$ brew --version
$ brew command [--verbose|-v] [options] [formula] …

https://docs.brew.sh/Manpage

brew

$ man brew

$ brew  list

$ brew  install node

$ brew  install nvm

$ brew  install yarn

$ nvm ls-remote | grep "Latest LTS"

refs



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2022-11-11 14:02  xgqfrms  阅读(52)  评论(7编辑  收藏  举报