迪克猪的博客
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Mac下安装yarn可真难呀

shell命令行安装


$ brew install yarn

Updating Homebrew...
Warning: You are using macOS 11.0.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this pre-release version.

==> Downloading https://www.sqlite.org/2020/sqlite-autoconf-3330000.tar.gz
Already downloaded: /Users/zhushuyan/Library/Caches/Homebrew/downloads/5e52b8b0330f34548b7eecfdac41259cbbf426fc52aba671aed35c19feebc11d--sqlite-autoconf-3330000.tar.gz
==> Downloading https://registry.npmjs.org/npm/-/npm-6.14.8.tgz
Already downloaded: /Users/zhushuyan/Library/Caches/Homebrew/downloads/4a48120cdffaa95e1727d094049a3fc38ad57fee802218d430526e91d3b39e0d--npm-6.14.8.tgz
==> Downloading https://nodejs.org/dist/v14.11.0/node-v14.11.0.tar.gz
Already downloaded: /Users/zhushuyan/Library/Caches/Homebrew/downloads/be4016d2d242d71f671e8dff9567d96677c9c67f17ddaa519b601be5b087d472--node-v14.11.0.tar.gz
==> Downloading https://yarnpkg.com/downloads/1.22.5/yarn-v1.22.5.tar.gz
Already downloaded: /Users/zhushuyan/Library/Caches/Homebrew/downloads/b858a5ca4ade7c6cd0a5deeb77770019c86813d12fc8950d70af904e6ded8e17--yarn-v1.22.5.tar.gz
==> Installing dependencies for yarn: sqlite and node
==> Installing yarn dependency: sqlite
==> ./configure --prefix=/usr/local/Cellar/sqlite/3.33.0 --enable-dynamic-extensions --enable-readline --disable-editline --enable-session
==> make install
==> Caveats
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have sqlite first in your PATH run:
  echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc

For compilers to find sqlite you may need to set:
  export LDFLAGS="-L/usr/local/opt/sqlite/lib"
  export CPPFLAGS="-I/usr/local/opt/sqlite/include"

For pkg-config to find sqlite you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"

==> Summary
🍺  /usr/local/Cellar/sqlite/3.33.0: 11 files, 4MB, built in 1 minute 25 seconds
==> Installing yarn dependency: node
==> ./configure --prefix=/usr/local/Cellar/node/14.11.0 --without-npm --with-intl=system-icu
==> make install
==> node /private/tmp/node-20200922-43938-860pp9/node-v14.11.0/npm_bootstrap/bin/npm-cli.js install -ddd --global --prefix=/usr/local/Cellar/node/14.11.0/libexe
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/node/14.11.0: 4,728 files, 62.8MB, built in 23 minutes 23 seconds
==> Installing yarn
🍺  /usr/local/Cellar/yarn/1.22.5: 14 files, 5MB, built in 3 seconds
==> Upgrading 1 dependent:
vim 8.2.1300 -> 8.2.1700
==> Upgrading vim 8.2.1300 -> 8.2.1700
==> Downloading https://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.xz

######################################################################## 100.0%

==> Downloading https://github.com/vim/vim/archive/v8.2.1700.tar.gz
==> Downloading from https://codeload.github.com/vim/vim/tar.gz/v8.2.1700

######################################################################## 100.0%

==> Installing dependencies for vim: gettext
==> Installing vim dependency: gettext
==> ./configure --prefix=/usr/local/Cellar/gettext/0.21 --with-included-gettext gl_cv_func_ftello_works=yes --with-included-glib --with-included-libcroco --with
==> make
==> make install
🍺  /usr/local/Cellar/gettext/0.21: 1,953 files, 19.8MB, built in 10 minutes 27 seconds
==> Installing vim
==> ./configure --prefix=/usr/local --mandir=/usr/local/Cellar/vim/8.2.1700/share/man --enable-multibyte --with-tlib=ncurses --with-compiledby=Homebrew --enable
==> make
==> make install prefix=/usr/local/Cellar/vim/8.2.1700 STRIP=/usr/bin/true
🍺  /usr/local/Cellar/vim/8.2.1700: 1,952 files, 33.2MB, built in 1 minute 31 seconds
Removing: /usr/local/Cellar/vim/8.2.1300... (1,923 files, 32.7MB)
==> Checking for dependents of upgraded formulae...
==> No broken dependents found!
==> Caveats
==> sqlite
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have sqlite first in your PATH run:
  echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc

For compilers to find sqlite you may need to set:
  export LDFLAGS="-L/usr/local/opt/sqlite/lib"
  export CPPFLAGS="-I/usr/local/opt/sqlite/include"

For pkg-config to find sqlite you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"

==> node
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

host文件配置

##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting.  Do not change this entry.
##
127.0.0.1	    localhost
255.255.255.255	broadcasthost
::1             localhost

# Added by Docker Desktop

# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal

# End of section

171.15.16.222           tx.1086sms.com
36.99.196.217           goproxy.cn
199.232.68.133          raw.githubusercontent.com
209.51.188.200          ftpmirror.gnu.org

# 2001:470:142:5::200   ftpmirror.gnu.org

101.6.8.193             mirrors.tuna.tsinghua.edu.cn
140.82.113.10           codeload.github.com
52.216.177.243          github-production-release-asset-2e65be.s3.amazonaws.com

# github.com

140.82.113.4    github.com
140.82.113.3    github.com
140.82.112.4    github.com
140.82.121.4    github.com
140.82.121.3    github.com
140.82.118.3    github.com
192.30.255.112  github.com
140.82.114.4    github.com # (美国弗吉尼亚州阿什本 github.com)	
203.208.39.99   google.com # (中国北京 google.com 电信)
54.169.195.247  api.github.com
13.250.94.254   api.github.com
13.250.168.23   api.github.com
203.208.39.99	api.github.com

# flutter

183.60.83.19    storage.flutter-io.cn
104.18.156.100  storage.flutter-io.cn
202.120.58.155  dart-pub.mirrors.sjtug.sjtu.edu.cn
172.217.24.19   pub.dartlang.org

# sqlite

45.33.6.223     www.sqlite.org

209.51.188.20   ftp.gnu.org
130.242.124.102 gmplib.org
151.101.110.133 deb.debian.org
151.101.78.133  deb.debian.org
151.101.230.133 deb.debian.org
128.93.193.15   isl.gforge.inria.fr

104.16.17.35    registry.npmjs.org
104.16.18.35    registry.npmjs.org
104.16.25.35    registry.npmjs.org
104.16.27.35    registry.npmjs.org
104.16.16.35    registry.npmjs.org
104.16.21.35    registry.npmjs.org
104.16.19.35    registry.npmjs.org
104.16.26.35    registry.npmjs.org
104.16.20.35    registry.npmjs.org
104.16.22.35    registry.npmjs.org
104.16.24.35    registry.npmjs.org
104.16.23.35    registry.npmjs.org

104.20.23.46    nodejs.org
104.20.22.46    nodejs.org

104.248.78.23   yarnpkg.com
165.227.12.111  yarnpkg.com
165.227.0.164   yarnpkg.com
138.68.244.143	yarnpkg.com
167.172.221.254 yarnpkg.com
104.248.78.24   yarnpkg.com
167.172.215.127 yarnpkg.com
206.189.73.52   yarnpkg.com
157.230.35.153  yarnpkg.com
157.230.37.202  yarnpkg.com
128.199.185.38  yarnpkg.com
206.189.89.118  yarnpkg.com
178.128.17.49   yarnpkg.com

134.209.106.40  classic.yarnpkg.com
178.128.17.49   classic.yarnpkg.com
157.230.35.153  classic.yarnpkg.com
157.230.45.115  classic.yarnpkg.com
128.199.185.38  classic.yarnpkg.com
157.230.37.202  classic.yarnpkg.com
157.230.43.191  classic.yarnpkg.com
206.189.89.118  classic.yarnpkg.com