HPCメモ

HPC(High Performance Computing)に関連したりしなかったりすることのメモ書き

Arm版 Mac book Airの動作確認

Apple silicon搭載のMac book Airがようやく届いたのでセットアップしています。

周辺機器編

うちの環境は以下のハードウェアは問題なく使えています。

  • HHKB BT
  • logicool MX vertical (BT接続)
  • AfterShokz Open Comm
  • yubikey

logicoolのはマウスユーティリティは入れてない状態でとりあえず使ってます。

ソフト編

aquaskk

最新ビルドはユニバーサルバイナリなのでダウンロードしてインストールすればOK

github.com

デフォルト設定を変えるには "システム環境設定" -> "キーボード" -> "入力ソース" と進んで"+"ボタンを押して"Aqua skk統合"を選びます。

ついでに(使わない人は)"日本語 - ローマ字入力"を消しておきましょう。

あと、C-j が使えない時に備えてこちらの設定をしましょう。

github.com

私の場合は、もともと使っていたIntel macからAir dropでコピーしてきただけですが。

home brew

こちらに先達がまとめてくださってます。

qiita.com

私の場合、必要なソフトは

  • ansible
  • awscli
  • macvim
  • tree
  • watch
  • nvm

くらいのものなんですが、こちらのissueの対応状況を見ると、動作確認済のものはtreeしかありませんw

github.com

というわけで一旦rosetta2を有効にしてターミナルを再起動し、home brewをインストールします。

最初にFinderからユーティリティ→ターミナルと進んで右クリックから”情報を見る”をすると、こんな画面が表示されるので”Rosettaを使用して開く”にチェックを入れてからダブルクリックします。

f:id:n_so5:20201122230822p:plain
ターミナルの”情報を見る”画面

すると続けて"Rosetta"をインストールしますかというダイアログが表示されるのでインストールします。

f:id:n_so5:20201122230949p:plain

最後にターミナル画面からいつものスクリプトを実行すると

% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/bin
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/sbin
/usr/local/share
/usr/local/var
/usr/local/opt
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew
/usr/local/var/homebrew/linked
/usr/local/Cellar
/usr/local/Caskroom
/usr/local/Homebrew
/usr/local/Frameworks
==> The Xcode Command Line Tools will be installed.

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
==> /usr/bin/sudo /usr/sbin/chown sogo /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
==> /usr/bin/sudo /bin/mkdir -p /Users/sogo/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/sogo/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown sogo /Users/sogo/Library/Caches/Homebrew
==> Searching online for the Command Line Tools
==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> Installing Command Line Tools for Xcode-12.2
==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command\ Line\ Tools\ for\ Xcode-12.2
Software Update Tool

Finding available software

Downloading Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode
Installing Command Line Tools for Xcode
Done with Command Line Tools for Xcode
Done.
==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
==> Downloading and installing Homebrew...
remote: Enumerating objects: 53, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 160665 (delta 3), reused 48 (delta 0), pack-reused 160612
Receiving objects: 100% (160665/160665), 41.09 MiB | 2.68 MiB/s, done.
Resolving deltas: 100% (119078/119078), done.
From https://github.com/Homebrew/brew
 * [new branch]      master     -> origin/master
 * [new tag]             0.1        -> 0.1
(中略)
 * [new tag]             2.5.9      -> 2.5.9
HEAD is now at 6177db752 Merge pull request #9242 from reitermarkus/sorbet-delegate
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (42/42), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 842808 (delta 23), reused 26 (delta 15), pack-reused 842766
Receiving objects: 100% (842808/842808), 329.86 MiB | 2.54 MiB/s, done.
Resolving deltas: 100% (567912/567912), done.
Tapped 2 commands and 5356 formulae (5,643 files, 362.5MB).
Already up-to-date.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (or will be during this `install` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run `brew help` to get started
- Further documentation: 
    https://docs.brew.sh

という具合にいつもどおりにインストールできます。

続けて、native版が対応していないソフトのインストールをします。

% brew install ansible awscli nvm macvim watch   
Warning: You are using macOS 11.0.
We do not provide support for this released but not yet supported version.
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
released but not yet supported version.

==> Downloading https://homebrew.bintray.com/bottles/libyaml-0.2.5.big_sur.bottl
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/openssl%401.1-1.1.1h.big_su
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/81fe98e819f1d3554d98c
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.18.1_1.big_sur.bottl
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/36b492f1b0910367dd394
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.4.big_sur.bott
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/0a6b12ddbee78cf31dfd7
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.33.0.big_sur.bottl
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/9f22ccb1b9d30d2026421
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.5.big_sur.bottle.tar
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/4fbd4a9e3eb49c27e83bd
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/python%403.9-3.9.0_1.big_su
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/bd4ebe03f4c8371c87b2e
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/ansible-2.10.3_1.big_sur.bo
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/bccc1cdb7938643294de5
######################################################################## 100.0%
==> Installing dependencies for ansible: libyaml, openssl@1.1, gdbm, readline, sqlite, xz and python@3.9
==> Installing ansible dependency: libyaml
==> Pouring libyaml-0.2.5.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/libyaml/0.2.5: 10 files, 348.2KB
==> Installing ansible dependency: openssl@1.1
==> Pouring openssl@1.1-1.1.1h.big_sur.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl@1.1/certs

and run
  /usr/local/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.

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

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

==> Summary
🍺  /usr/local/Cellar/openssl@1.1/1.1.1h: 8,067 files, 18.5MB
==> Installing ansible dependency: gdbm
==> Pouring gdbm-1.18.1_1.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/gdbm/1.18.1_1: 25 files, 787.2KB
==> Installing ansible dependency: readline
==> Pouring readline-8.0.4.big_sur.bottle.tar.gz
==> Caveats
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides BSD libedit.

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

==> Summary
🍺  /usr/local/Cellar/readline/8.0.4: 48 files, 1.6MB
==> Installing ansible dependency: sqlite
==> Pouring sqlite-3.33.0.big_sur.bottle.tar.gz
==> 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"

==> Summary
🍺  /usr/local/Cellar/sqlite/3.33.0: 11 files, 4MB
==> Installing ansible dependency: xz
==> Pouring xz-5.2.5.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/xz/5.2.5: 95 files, 1.4MB
==> Installing ansible dependency: python@3.9
==> Pouring python@3.9-3.9.0_1.big_sur.bottle.tar.gz
==> /usr/local/Cellar/python@3.9/3.9.0_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr
==> /usr/local/Cellar/python@3.9/3.9.0_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr
==> /usr/local/Cellar/python@3.9/3.9.0_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python@3.9/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.9/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python@3.9/3.9.0_1: 4,447 files, 72MB
==> Installing ansible
==> Pouring ansible-2.10.3_1.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/ansible/2.10.3_1: 36,795 files, 344.5MB
==> Downloading https://homebrew.bintray.com/bottles/awscli-2.1.1_1.big_sur.bott
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/e41a65e5f3cac43fabde4
######################################################################## 100.0%
==> Pouring awscli-2.1.1_1.big_sur.bottle.tar.gz
==> Caveats
The "examples" directory has been installed to:
  /usr/local/share/awscli/examples

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

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/awscli/2.1.1_1: 11,671 files, 80.6MB
==> Downloading https://github.com/creationix/nvm/archive/v0.37.0.tar.gz
==> Downloading from https://codeload.github.com/nvm-sh/nvm/tar.gz/v0.37.0
######################################################################## 100.0%
==> Caveats
Please note that upstream has asked us to make explicit managing
nvm via Homebrew is unsupported by them and you should check any
problems against the standard nvm install method prior to reporting.

You should create NVM's working directory if it doesn't exist:

  mkdir ~/.nvm

Add the following to ~/.zshrc or your desired shell
configuration file:

  export NVM_DIR="$HOME/.nvm"
  [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"  # This loads nvm
  [ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion

You can set $NVM_DIR to any location, but leaving it unchanged from
/usr/local/opt/nvm will destroy any nvm-installed Node installations
upon upgrade/reinstall.

Type `nvm help` for further information.

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/nvm/0.37.0: 7 files, 162.2KB, built in 1 second
==> Downloading https://homebrew.bintray.com/bottles/cscope-15.9.big_sur.bottle.
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.21.big_sur.bottle
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/a025e143fe3f5f7e24a93
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/lua-5.3.5_1.big_sur.bottle.
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/ruby-2.7.2.big_sur.bottle.t
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/39e7896f6b1c365dcff14
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/macvim-8.2-166_1.catalina.b
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/7f672f36e953d8eee8136
######################################################################## 100.0%
==> Installing dependencies for macvim: cscope, gettext, lua and ruby
==> Installing macvim dependency: cscope
==> Pouring cscope-15.9.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/cscope/15.9: 11 files, 744.2KB
==> Installing macvim dependency: gettext
==> Pouring gettext-0.21.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/gettext/0.21: 1,953 files, 19.8MB
==> Installing macvim dependency: lua
==> Pouring lua-5.3.5_1.big_sur.bottle.tar.gz
==> Caveats
You may also want luarocks:
  brew install luarocks
==> Summary
🍺  /usr/local/Cellar/lua/5.3.5_1: 28 files, 366.9KB
==> Installing macvim dependency: ruby
==> Pouring ruby-2.7.2.big_sur.bottle.tar.gz
==> Caveats
By default, binaries installed by gem will be placed into:
  /usr/local/lib/ruby/gems/2.7.0/bin

You may want to add this to your PATH.

ruby 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 ruby first in your PATH run:
  echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc

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

==> Summary
🍺  /usr/local/Cellar/ruby/2.7.2: 20,156 files, 35.3MB
==> Installing macvim
==> Pouring macvim-8.2-166_1.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/macvim/8.2-166_1: 2,358 files, 45.4MB
==> Downloading https://homebrew.bintray.com/bottles/ncurses-6.2.big_sur.bottle.
Already downloaded: /Users/sogo/Library/Caches/Homebrew/downloads/8c13ed71dba38dddcea53db8a51a3482470fbe940df060ef71a4dc43d3b6844f--ncurses-6.2.big_sur.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/watch-3.3.16.big_sur.bottle
Already downloaded: /Users/sogo/Library/Caches/Homebrew/downloads/6417c727d1992eb68c1bac311f6894000f29615dcfbb878c77765e30ed36103b--watch-3.3.16.big_sur.bottle.tar.gz
==> Installing dependencies for watch: ncurses
==> Installing watch dependency: ncurses
==> Pouring ncurses-6.2.big_sur.bottle.tar.gz
==> Caveats
ncurses 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 ncurses first in your PATH run:
  echo 'export PATH="/usr/local/opt/ncurses/bin:$PATH"' >> ~/.zshrc

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

==> Summary
🍺  /usr/local/Cellar/ncurses/6.2: 3,913 files, 8.9MB
==> Installing watch
==> Pouring watch-3.3.16.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/watch/3.3.16: 10 files, 135KB
==> Caveats
==> openssl@1.1
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl@1.1/certs

and run
  /usr/local/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.

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

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

==> readline
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides BSD libedit.

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

==> 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"

==> python@3.9
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python@3.9/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.9/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> awscli
The "examples" directory has been installed to:
  /usr/local/share/awscli/examples

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

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions
==> nvm
Please note that upstream has asked us to make explicit managing
nvm via Homebrew is unsupported by them and you should check any
problems against the standard nvm install method prior to reporting.

You should create NVM's working directory if it doesn't exist:

  mkdir ~/.nvm

Add the following to ~/.zshrc or your desired shell
configuration file:

  export NVM_DIR="$HOME/.nvm"
  [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"  # This loads nvm
  [ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion

You can set $NVM_DIR to any location, but leaving it unchanged from
/usr/local/opt/nvm will destroy any nvm-installed Node installations
upon upgrade/reinstall.

Type `nvm help` for further information.

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> lua
You may also want luarocks:
  brew install luarocks
==> ruby
By default, binaries installed by gem will be placed into:
  /usr/local/lib/ruby/gems/2.7.0/bin

You may want to add this to your PATH.

ruby 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 ruby first in your PATH run:
  echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc

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

==> ncurses
ncurses 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 ncurses first in your PATH run:
  echo 'export PATH="/usr/local/opt/ncurses/bin:$PATH"' >> ~/.zshrc

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

nvm

よく見るとnvmのインストール時になんか不穏なことを言われていました。

Please note that upstream has asked us to make explicit managing
nvm via Homebrew is unsupported by them and you should check any
problems against the standard nvm install method prior to reporting.

というわけで、brew uninstallした上で本家の方法に従ってインストールします。

github.com

せっかくだからrosetta2無しのターミナルでやってみましょう。

% curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13527  100 13527    0     0  29153      0 --:--:-- --:--:-- --:--:-- 29090
=> Downloading nvm from git to '/Users/sogo/.nvm'
=> Cloning into '/Users/sogo/.nvm'...
remote: Enumerating objects: 317, done.
remote: Counting objects: 100% (317/317), done.
remote: Compressing objects: 100% (269/269), done.
remote: Total 317 (delta 36), reused 135 (delta 23), pack-reused 0
Receiving objects: 100% (317/317), 170.27 KiB | 491.00 KiB/s, done.
Resolving deltas: 100% (36/36), done.
=> Compressing and cleaning up git repository

=> Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
=> Create one of them and run this script again
   OR
=> Append the following lines to the correct file yourself:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

.zshrcが無いから設定を書いてないよと言われるので、.zshrcを作成して再実行します。

so5@MBA ~ % touch .zshrc
so5@MBA ~ % curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13527  100 13527    0     0   151k      0 --:--:-- --:--:-- --:--:--  151k
=> nvm is already installed in /Users/sogo/.nvm, trying to update using git
=> => Compressing and cleaning up git repository

=> Appending nvm source string to /Users/sogo/.zshrc
=> Appending bash_completion source string to /Users/sogo/.zshrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

この状態で、新しくシェルを起動すると

zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?

と文句を言われます。 こちらの記事のとおり、2箇所ほどchmod 755してあげると良いようなので とりあえずこれで対処します。

qiita.com

なんで、777でディレクトリを作っちゃったんでしょうね?

続けて、とりあえず何かインストールしようと思ってnvm install --ltsすると、nodeのコンパイルが始まりましたorz

そりゃ、arm Mac用のnodeのバイナリパッケージなんて無いから、ソースからビルドされますねw

大変面倒なんで、再びrosetta2を有効にしたターミナルを起動してそちらでnvm installしてみます。

so5@MBA ~ % nvm install --lts
Installing latest LTS version.
Downloading and installing node v14.15.1...
Downloading https://nodejs.org/dist/v14.15.1/node-v14.15.1-darwin-x64.tar.xz...
######################################################################### 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v14.15.1 (npm v6.14.8)
Creating default alias: default -> lts/* (-> v14.15.1)

こっちだと問題無いですね。 でも何かそのうちトラブりそうですね。適当なターミナルアプリをインストールしてrosetta2を常時有効にしておけば、使い分けも楽になるかなぁ?

ドットファイル

いわゆるドットファイルですが、私はgithubにひととおり上げて運用しているので、そちらを使えるように設定します。 といってもgitはhome brewのインストール時に入れてくれてるので普通にgit cloneしてくるだけです。

これで、vimの設定ファイルが用意できたので、gvimを立ち上げて:PlugInstallします。その後gvimを再起動すると黒い画面その1とお別れができましたw

f:id:n_so5:20201123014048p:plain

solarized

こちらのリポジトリでターミナル用のsolarized設定が公開されています。

github.com

この手のものは、アップデートに備えてgit cloneしておくのが(vim pluginとかでは)定番なんですが、たぶん変更されることはないんで直接インストールします

ターミナルを開いて

% curl  https://raw.githubusercontent.com/tomislav/osx-terminal.app-colors-solarized/master/Solarized%20Light.terminal >'Solarized Light.terminal' && open 'Solarized Light.terminal'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  107k  100  107k    0     0   890k      0 --:--:-- --:--:-- --:--:--  890k

とするとsolarizedで設定されたターミナルが開きます。

そのままメニューから"環境設定" -> "プロファイル"と進んで、左側の一覧からSolarized Lightを選んでデフォルトに設定しましょう。これで黒い画面その2ともお別れですw

DarkテーマもインストールするならLightの部分をDarkに置き換えてDarkテーマもダウンロード&インストールしておきましょう。 一回インストールしたら、ダウンロードしたファイルは不要なので、消してしまっても問題ありません。

ブラウザ

firefoxgoogle chromeをダウンロードしてインストールします。 どちらもdmgファイルをダウンロード -> ダブルクリック -> drag and drop という流れなんですが、chromeの方はApple Mac版(いやMacは全部Appleだからapple CPU搭載Macか) とIntel Mac版が選べるようになってます。

f:id:n_so5:20201123020748p:plain

office 365

office 365の管理ページからOfficeのインストーラをダウンロードしてインストールします。 特に問題もおきず、ワード、エクセル、パワポ、Onedriveあたりは使えています。

オンラインストレージ関係

以下のものをインストールしてみましたが、google drive用は2つともエラーが出て起動できませんでした。

  • onedrive (office 365と個人アカウントの2つ)
  • google Drive file stream (GSuite用)
  • google バックアップと同期 (個人アカウント用)
  • amazon photo

google Drive file streamの方は、こういう指示が表示されますが、"セキュリティとプライバシー"を開いても許可する項目が表示されず"エラーが発生しました"と表示されて落ちます。

f:id:n_so5:20201123025922p:plain

バックアップと同期の方は設定をひととおり終えた段階でこのようなエラーが表示されます。もちろんアカウントの接続を解除してやり直しても同じエラーが繰り返されます。

f:id:n_so5:20201123031230p:plain

その他app storeから導入したアプリ

とりあえずこのへんを入れています。

  • magnet
  • The Unarchiver
  • last pass
  • slack

magnetはBig sur&apple silicon対応、The UnarchiverはBig Sur対応とそれぞれ記載されてlast passはどちらも記述無しという状態ですが、いずれも問題なく使えています。

まとめ

今のところ問題なのは、googleドライブ関連ソフトがどっちも駄目っていうのが一番大きいですが、これはそのうち解消されるだろうからあまり深刻な感じはしません。 どちらかというとlast passのsafari用機能拡張が無くなってて、彼らが対応してくれるかどうか不安なのが一番の問題かもしれませんw

まーでもMac mini(2016) -> Mac mini(2019)のアップデートをTime machineから復元する機能を使ってやった時に比べればはるかにマシですね。