11
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Macにhomebrewでyarnをインストールする(macOS Catalina)

Last updated at Posted at 2019-10-16

Macにhomebrewでyarnをインストールする(macOS Catalina)

Macにhomebrewでyarnをインストールするメモです。
最近 macOS Catalinaに移行したばかり。

とりあえず、$ brew install yarn を実行。

$ brew install yarn
==> Installing dependencies for yarn: icu4c and node
==> Installing yarn dependency: icu4c

(...なんやかんや...)

==> Installing yarn
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: An exception occurred within a child process:
  CompilerSelectionError: yarn cannot be built with any available compilers.
Install GNU's GCC:
  brew install gcc

gccが必要なんですね。すみませんでした。$ brew install gcc を実行。

$ brew install gcc
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: The following formula
  gcc
cannot be installed as binary package and must be built from source.
Install the Command Line Tools:
  xcode-select --install

xcode-selectも言われた通りインストールする。$ xcode-select --install 実行。

$ xcode-select --install
xcode-select: note: install requested for command line developer tools

OK!もっかいgccインストール。

$ brew install gcc

(...なんやかんや...)

==> Installing gcc
==> Downloading https://homebrew.bintray.com/bottles/gcc-9.2.0_1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e1/e1a6cd0d52fb715431063657cec4e3578170079168b612a6998d321d778330b1?__gda__=exp=1571205974~hmac=f8db0bd0
######################################################################## 100.0%

入ったっぽい。もっかいyarnインストール。

$ brew install yarn

(...なんやかんや...)

==> Downloading https://yarnpkg.com/downloads/1.19.1/yarn-v1.19.1.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/49970642/45a6eb00-e985-11e9-8d2c-2c9597fae425?X-Amz-Algorithm=AWS4-
######################################################################## 100.0%
🍺  /usr/local/Cellar/yarn/1.19.1: 14 files, 5MB, built in 9 seconds

お、いけたんかな。

$ yarn -v
1.19.1

いけてました。おわり。

11
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?