質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Q&A

2回答

2259閲覧

rubyのRMagicをインストールしたいがエラーになりインストールできない

katsuya_ds

総合スコア35

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

0グッド

0クリップ

投稿2017/07/03 06:57

rubyのgemであるRMagicをインストールしようとするのですが、エラーが表示されてしまいます。
ImageMagick-6.9.8-Q8はインストール済みです。

エラーの内容は以下です。

Temporarily enhancing PATH to include DevKit... Building native extensions with: '--with-opt-dir="C:ImageMagick-6.9.8-Q8"' This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0/ext/RMagick C:/Ruby23/bin/ruby.exe -r ./siteconf20170703-7760-1mzhcbu.rb extconf.rb --with-opt-dir="C:ImageMagick-6.9.8-Q8" *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Ruby23/bin/$(RUBY_BASE_NAME) extconf.rb:141:in ``': No such file or directory - identify -version (Errno::ENOENT) from extconf.rb:141:in `configure_compile_options' from extconf.rb:16:in `initialize' from extconf.rb:548:in `new' from extconf.rb:548:in `<main>' extconf failed, exit code 1 Gem files will remain installed in C:/Ruby23/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0 for inspection. Results logged to C:/Ruby23/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/rmagick-2.16.0/gem_make.out C:\Users\katsuya>set CPATH=C:\ImageMagick-6.9.8-Q8\include C:\Users\katsuya>set LIBRARY_PATH=C:\ImageMagick-6.9.8-Q8\lib C:\Users\katsuya>gem install rmagick -- '--with-opt-dir="C:ImageMagick-6.9.8-Q8"' Temporarily enhancing PATH to include DevKit... Building native extensions with: '--with-opt-dir="C:ImageMagick-6.9.8-Q8"' This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0/ext/RMagick C:/Ruby23/bin/ruby.exe -r ./siteconf20170703-14704-qd0k30.rb extconf.rb --with-opt-dir="C:ImageMagick-6.9.8-Q8" *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Ruby23/bin/$(RUBY_BASE_NAME) extconf.rb:141:in ``': No such file or directory - identify -version (Errno::ENOENT) from extconf.rb:141:in `configure_compile_options' from extconf.rb:16:in `initialize' from extconf.rb:548:in `new' from extconf.rb:548:in `<main>' extconf failed, exit code 1 Gem files will remain installed in C:/Ruby23/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0 for inspection. Results logged to C:/Ruby23/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/rmagick-2.16.0/gem_make.out

どなたか解決法がわかりましたら教えてください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

otn

2017/07/03 07:35 編集

コメント書き間違いです
katsuya_ds

2017/07/03 07:35

C:\Users\katsuya>gem install rmagick Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0/ext/RMagick C:/Ruby23/bin/ruby.exe -r ./siteconf20170703-10948-qaacrd.rb extconf.rb *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Ruby23/bin/$(RUBY_BASE_NAME) extconf.rb:141:in ``': No such file or directory - identify -version (Errno::ENOENT) from extconf.rb:141:in `configure_compile_options' from extconf.rb:16:in `initialize' from extconf.rb:548:in `new' from extconf.rb:548:in `<main>' extconf failed, exit code 1 Gem files will remain installed in C:/Ruby23/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0 for inspection. Results logged to C:/Ruby23/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/rmagick-2.16.0/gem_make.out
katsuya_ds

2017/07/03 07:36

これが全文です。
guest

回答2

0

Could not create Makefile due to some reason, probably lack of necessary

libraries and/or headers. Check the mkmf.log file for more details.

日本語訳:
何らかの理由で、Makefileが作れなかった。多分、必要なライブラリかヘッダが無い。
詳しくはmkmf.logをチェックしましょう。

投稿2017/07/03 07:43

otn

総合スコア84423

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

katsuya_ds

2017/07/03 08:10

"gcc -o conftest.exe -IC:/Ruby23/include/ruby-2.3.0/i386-mingw32 -IC:/Ruby23/include/ruby-2.3.0/ruby/backward -IC:/Ruby23/include/ruby-2.3.0 -I. "-Ic:\Program Files\ImageMagick-6.9.8-Q16-HDRI/include" -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby23/lib -L"c:\Program Files\ImageMagick-6.9.8-Q16-HDRI/lib" -L. -lCORE_RL_magick_ -lmsvcrt-ruby230 -lCORE_RL_magick_ -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi " C:\Users\katsuya\AppData\Local\Temp\cc1bsO36.o: In function `t': C:\Ruby23\lib\ruby\gems\2.3.0\gems\rmagick-2.16.0\ext\RMagick/conftest.c:25: undefined reference to `_imp__TransparentPaintImageChroma' collect2.exe: error: ld returned 1 exit status checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <winsock2.h> 4: #include <windows.h> 5: #include <assert.h> 6: #include <ctype.h> 7: #include <stdio.h> 8: #include <stdlib.h> 9: #include <math.h> 10: #include <time.h> 11: #include <stdint.h> 12: #include <sys/types.h> 13: #include <wand/MagickWand.h> 14: 15: /*top*/ 16: extern int t(void); 17: int main(int argc, char **argv) 18: { 19: if (argc > 1000000) { 20: printf("%p", &t); 21: } 22: 23: return 0; 24: } 25: int t(void) { void ((*volatile p)()); p = (void ((*)()))TransparentPaintImageChroma; return !p; } こういう箇所が見つかりました。
guest

0

環境変数のディレクトリ区切りを/に変えてみたら、どうなるでしょうか。

投稿2017/07/03 07:26

maisumakun

総合スコア145123

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

katsuya_ds

2017/07/03 07:37

set CPATH=C:/ImageMagick-6.9.8-Q8/include set LIBRARY_PATH=C:/ImageMagick-6.9.8-Q8/lib こうしてみましたがダメなようです。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問