ttscoff / doing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doing failed to install on macOS Monterey 12.0.2

TribuneX opened this issue · comments

Executing sudo gem install doing leads to the following error on my machine (macOS Monterey 12.0.2):

Building native extensions. This could take a while...
ERROR:  Error installing doing:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/amatch-0.4.0/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20211121-5453-1vbqjea.rb extconf.rb
creating Makefile

current directory: /Library/Ruby/Gems/2.6.0/gems/amatch-0.4.0/ext
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.6.0/gems/amatch-0.4.0/ext
make "DESTDIR="
make: *** No rule to make target `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin21/ruby/config.h', needed by `amatch_ext.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/amatch-0.4.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-21/2.6.0/amatch-0.4.0/gem_make.out

My ruby version:

❯ ruby -v                                          
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]

Any hints what's wrong here? Thanks.

I just tested a gem install on my own copy of Monterey with the system ruby (2.6) and it succeeded, so we just have to figure out the difference. Do you happen to have the Xcode command line tools installed?

same error for me on BigSur, so it is not Monterey related!
I fixed it with
sudo xcode-select -switch /

I've removed the amatch requirement from 2.0.13, which should circumvent this error (along with the need for the command line tools/make to install).

Thanks. Worked for me now!