1
1

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 3 years have passed since last update.

macOS アプデ後のエラー対応 macOSHighSierra -> macOSMonterey

Last updated at Posted at 2022-04-13

概要

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更新するんじゃ
brew update && brew upgrade
brew creanup

vim

vim動いた:innocent:

※ 実際はupgrade時にエラー出力なり、コマンド実行を促されたものに対しては都度対応して何回かbrew upgradeした。

brew doctor問題

brewの環境を診断するやつ
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
で何も表示されなくなった。わーい:innocent:

余談 & 追記

32bitのAdobeインストーラー系ファイルだけ消えない。。どうしたものか。:fearful:
一回OSデグレさせて消してこないとダメか。。?:rage:

TimeMachineバックアップしたら、Adobeのアプリが正常に認識されたようで、アプリに起動不可マークがついて、OSアプデ後の熱暴走っぽい挙動が消えました:innocent:

いや~、macOS、よくできたOSだわ (前は突発でフリーズすることもあったけど):star2:

参考

このQiitaページよりこっちを見たほうが参考になるよ ↓

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?