RMagickが入らないでござる…の巻
環境は wsl2 の debian sid、ruby は rbenv で入れた2.7.4。
追記: Ubuntu 20.04.3 on wsl2 ,ruby 2.7.4p191 でもほぼ同じ手順で RMagick をインストールできました。
❯ gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: /home/tsut/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/rmagick-4.2.3/ext/RMagick
/home/tsut/.rbenv/versions/2.7.4/bin/ruby -I /home/tsut/.rbenv/versions/2.7.4/lib/ruby/2.7.0 -r ./siteconf20211014-1879-j0t0tw.rb extconf.rb
checking for brew... no
checking for pacman... no
checking for Ruby version >= 2.3.0... yes
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' foundMagickCore.pc が見つからないって言ってるらしい。 ぐぐるとRMagickが入らなくて苦労したってヒトむっちゃいるじゃん。