顯示具有 Shell 標籤的文章。 顯示所有文章
顯示具有 Shell 標籤的文章。 顯示所有文章

2019年10月17日 星期四

升級至 macOS Catalina 之後,iStats 無法使用

$ istats 
-bash: /usr/local/bin/istats: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory

看起來找不到 macOS 自帶的 ruby 2.3,看到這邊其實就曉得當初沒有正確使用 Homebrew 的 ruby 安裝 iStats。

從 macOS Catalina 版開始,Mac 使用 zsh 做為預設登入 shell

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050. 

剛從 macOS Mojave (10.14.6) 升級成 macOS Catalina (10.15) ,第一次打開終端機,映入眼簾的是上面這段話。 因為是從舊版升上來的,所以 echo $SHELL 的結果是 /bin/bash ,但以後 Mac 出廠預載應該都是 zsh 了。 順便提一下 macOS Catalina (10.15) 的 bash 跟 zsh 各是什麼版本

$ uname -v
Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64

$ /bin/bash --help
GNU bash, version 3.2.57(1)-release-(x86_64-apple-darwin19)

$ /bin/zsh --version

zsh 5.7.1 (x86_64-apple-darwin19.0)