rmagick 和 magick-config 出错

getting error for rmagick and magick-config

我正在使用 rvm 1.9.3 和 rails 3。 但是当 运行 为我的应用安装捆绑软件时,我收到了这个错误。

current directory: /home/ubuntu/.rvm/gems/ruby-1.9.3-p551@app/gems/rmagick-2.13.2/ext/RMagick /home/ubuntu/.rvm/rubies/ruby-1.9.3-p551/bin/ruby -r ./siteconf20180628-13119-1ds4iy4.rb 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/ubuntu/.rvm/gems/ruby-1.9.3-p551@app/bin:/home/ubuntu/.rvm/gems/ruby-1.9.3-p551@global/bin:/home/ubuntu/.rvm/rubies/ruby-1.9.3-p551/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.

提供的配置选项:

--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/ubuntu/.rvm/rubies/ruby-1.9.3-p551/bin/ruby

要了解此扩展编译失败的原因,请查看 mkmf.log,可在此处找到:

/home/ubuntu/.rvm/gems/ruby-1.9.3-p551@app/extensions/x86_64-linux/1.9.1/rmagick-2.13.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/ubuntu/.rvm/gems/ruby-1.9.3-p551@app/gems/rmagick-2.13.2 for inspection. Results logged to /home/ubuntu/.rvm/gems/ruby-1.9.3-p551@app/extensions/x86_64-linux/1.9.1/rmagick-2.13.2/gem_make.out

注意:命令我已经用过了 sudo apt-get install build-essential imagemagick libmagickcore-dev libmagickwand-dev sudo apt-get install libmagickwand-dev

我前段时间遇到了同样的问题,我安装了 ImageMagick 和其他东西,但我在安装 rmagick 时遇到错误

唯一对我有用的是 运行 这个与 sudo 一起使用,可能对你也有用

ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config

从这里开始 https://github.com/rmagick-temp/rmagick/issues/133#issuecomment-185414504