我不得不将ruby版本切换到2.0.0-p353。我使用rbenv并正常安装p353(rbenv安装)。
出于某种原因,rmagick无法安装在这个ruby版本上。完全错误:
Fetching: rmagick-2.13.2.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/home/dot/.rbenv/versions/2.0.0-p353/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in /home/dot/.rbenv/versions/2.0.0-p353/bin:/home/dot/.rbenv/libexec:/home/dot/.rbenv/plugins/ruby-build/bin:/home/dot/perl5/bin:/home/dot/opt/bin:/home/dot/.rbenv/bin:/home/dot/perl5/bin:/home/dot/.rbenv/shims:/home/dot/opt/bin:/home/dot/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/dot/opt/algs4/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/dot/opt/algs4/bin
*** 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=/home/dot/.rbenv/versions/2.0.0-p353/bin/ruby
Gem files will remain installed in /home/dot/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2 for inspection.
Results logged to /home/dot/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/ext/RMagick/gem_make.out
我的系统上安装了所有header和-dev软件包,因为rmagick安装在2.0.0-p481中。
$ rbenv version && gem list | grep rmagick
2.0.0-p481 (set by /home/dot/.rbenv/version)
rmagick (2.13.2)
apt install imagemagick libmagickwand-dev
imagemagick is already the newest version.
libmagickwand-dev is already the newest version.
以下是全新安装:http://paste.debian.net/hidden/102606b7/
有什么想法吗?
答案 0 :(得分:2)
在Ubuntu上:
▷ dpkg --search Magick-config
libmagickcore-dev: /usr/share/man/man1/Magick-config.1.gz
libmagickcore-dev: /usr/bin/Magick-config
这显然意味着你可能需要
▷ sudo apt-get install libmagickcore-dev
希望它有所帮助。