我首先使用此命令安装ImageMagick -
sudo apt-get install imagemagick
但是当我进行捆绑安装时,我收到此错误 -
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/aasish/.rvm/gems/ruby-2.3.0@re-management/gems/rmagick-2.15.4/ext/RMagick
/home/aasish/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160826-4124-lxm3rv.rb extconf.rb
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details.
/home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/aasish/.rvm/gems/ruby-2.3.0@re-management/extensions/x86_64-linux/2.3.0/rmagick-2.15.4/mkmf.log
extconf failed, exit code 1
我需要帮助,即使我尝试将ImageMacick的版本从6.7.7更改为7.0.2
我使用的是Ubuntu 14.04操作系统
这是错误 -
You have to install development tools first.
from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:587:in `try_cpp'
from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:1091:in `block in have_header'
from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:1090:in `have_header'
from extconf.rb:38:in `configure_headers'
from extconf.rb:18:in `initialize'
from extconf.rb:517:in `new'
from extconf.rb:517:in `<main>'
答案 0 :(得分:1)
您必须先安装开发工具。
尝试安装dev-tools
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev