Help us understand the problem. What is going on with this article?

BigSurでvagrantが動かなくなった話

こういうの不慣れで読みにくいと思います。
少しでもお役に立てれば!

vagrant up

すると

Vagrant failed to initialize at a very early stage:

The plugins failed to initialize correctly. This may be due to manual
modifications made within the Vagrant home directory. Vagrant can
attempt to automatically correct this issue by running:

  vagrant plugin repair

If Vagrant was recently updated, this error may be due to incompatible
versions of dependencies. To fix this problem please remove and re-install
all plugins. Vagrant can attempt to do this automatically by running:

  vagrant plugin expunge --reinstall

Or you may want to try updating the installed plugins to their latest
versions:

  vagrant plugin update

こんなので怒られます。
今回はversion更新したので2番目を使っていきます。

すると...

Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:

ERROR: Failed to build gem native extension.

こんな感じのエラーで怒られますね!!

../.vagrant.d/gems/2.6.6/extensions/x86_64-darwin-19/2.6.0/unf_ext-0.0.7.7/mkmf.log

このログ見ろって言われるので見ます。

中身見ると...

clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]

はい出ました。今回の原因です。

> xcrun --sdk macosx --show-sdk-path

こいつを打つと新しいパスがわかります。

新しいパスを該当箇所見つけて置換するもよし、
symlinkをするのもよし

私は怖いのでsymlinkしました。

余談
https://github.com/hashicorp/vagrant-installers/issues/163#issuecomment-625503064
2.2.9で直ってるよ!って言ってるけど直ってないんじゃないかなぁ...
私のせいかな?

runamoon@github
railsプログラマ 趣味程度にandroidアプリを作成中(3アプリ公開中) vimをもっと上手く使いたい
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away