概要
macOSをアップデートしたら色々不具合起きたので適当に解消しました。
macOS
macOSHighSierra -> macOSMonterey
問題
- vimが起動しない!!
-
brew doctorで色々出る
他にも色々あったけど、たいていは 〜rc(.zshrc, .bashrcとか)ファイルを手直しすれば動いた=ファイルパスの問題
vim問題
dylib Library not loaded
vimを起動しようとするとdylib未読込みのエラーが出る。
brew upgradeをだいぶしてなかった & OSアプデで色々変わったっぽい
dyld[3504]: Library not loaded: /usr/local/opt/ruby/lib/libruby.3.0.dylib
Referenced from: /usr/local/Cellar/vim/8.2.2650/bin/vim
Reason: tried: '/usr/local/opt/ruby/lib/libruby.3.0.dylib' (no such file), '/usr/local/lib/libruby.3.0.dylib' (no such file), '/usr/lib/libruby.3.0.dylib' (no such file), '/usr/local/Cellar/ruby/3.1.1/lib/libruby.3.0.dylib' (no such file), '/usr/local/lib/libruby.3.0.dylib' (no such file), '/usr/lib/libruby.3.0.dylib' (no such file)
他にも色々エラー出てた。
わからん。いみわからん。
とりあえず Stack overflow の指示に従って
brew(と全パッケージ) を更新してみる
brew update && brew upgrade
brew creanup
vim
vim動いた![]()
※ 実際はupgrade時にエラー出力なり、コマンド実行を促されたものに対しては都度対応して何回かbrew upgradeした。
brew doctor問題
brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Some installed kegs have no formulae!
This means they were either deleted or installed with `brew diy`.
You should find replacements for the following formulae:
python@2
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/python3.9/greenlet/greenlet.h
Unbrewed header files
Homebrew管理場所以外のパスで同名のheaderファイルが存在する。
ほっとくとファイル重複する(アプリケーション動作障害発生の)可能性あり
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/python3.9/greenlet/greenlet.h
要らんのでディレクトリごと消す
$ rm -rf /usr/local/include/python3.9/greenlet
$ ll /usr/local/include/python3.9/
total 0
deleted formulae
既に削除された(存在しない)不要なformulaeがある。
This means they were either deleted or installed with `brew diy`.
You should find replacements for the following formulae:
python@2
$ which python
/usr/local/bin/python
$ ll /usr/local/bin/python
lrwxr-xr-x 1 hoge admin 38B 4 13 15:09 /usr/local/bin/python@ -> ../Cellar/python@2/2.7.15_1/bin/python
$ ll /usr/local/Cellar/python@2/2.7.15_1
total 152
drwxr-xr-x 3 hoge staff 96B 4 30 2018 Frameworks/
drwxr-xr-x 3 hoge staff 96B 4 30 2018 IDLE.app/
-rw-r--r-- 1 hoge staff 2.6K 12 6 2018 INSTALL_RECEIPT.json
-rw-r--r-- 1 hoge staff 12K 4 30 2018 LICENSE
drwxr-xr-x 3 hoge staff 96B 4 30 2018 Python Launcher.app/
-rw-r--r-- 1 hoge staff 54K 12 6 2018 README
drwxr-xr-x 28 hoge staff 896B 12 6 2018 bin/
drwxr-xr-x 3 hoge staff 96B 4 30 2018 lib/
drwxr-xr-x 5 hoge staff 160B 4 30 2018 libexec/
drwxr-xr-x 5 hoge staff 160B 4 30 2018 share/
$ pyenv versions
system
2.7
3.10.0a6
3.6.4
3.7.0
* 3.7.1 (set by /Users/hoge/.python-version)
3.9.0
ファイルは色々あるけど 2.7.15_1 がそもそもインストールされてない?
覚えてないけど、、python2は要らんから消す
$ brew uninstall python@2
Uninstalling /usr/local/Cellar/python@2/2.7.15_1... (4,719 files, 83.6MB)
creanup
全部終わったら掃除もしとく
brew creanup
結果
brew doctor
で何も表示されなくなった。わーい![]()
余談 & 追記
32bitのAdobeインストーラー系ファイルだけ消えない。。どうしたものか。![]()
一回OSデグレさせて消してこないとダメか。。?![]()
→ TimeMachineバックアップしたら、Adobeのアプリが正常に認識されたようで、アプリに起動不可マークがついて、OSアプデ後の熱暴走っぽい挙動が消えました![]()
いや~、macOS、よくできたOSだわ (前は突発でフリーズすることもあったけど)![]()
参考
このQiitaページよりこっちを見たほうが参考になるよ ↓