Coj*_*nes 10 ruby-on-rails rmagick imagemagick
我在很长一段时间运行后,Debian服务器和升级的所有软件包(apt-get update,apt-get upgrade,apt-get distro-upgrade).然后rmagick不再工作了因为imagemagick被更新了.
所以我跑了:
gem uninstall rmagick
bundle install
Run Code Online (Sandbox Code Playgroud)
然后我得到了这个:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/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 0.0.0. Can't find Magick-config in /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
*** 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=/usr/local/bin/ruby
extconf failed, exit code 1
Gem files will remain installed in /srv/www/www.example.com/shared/vendor/bundle/ruby/2.1.0/gems/rmagick-2.13.3 for inspection.
Results logged to /srv/www/www.example.com/shared/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/rmagick-2.13.3/gem_make.out
An error occurred while installing rmagick (2.13.3), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.3'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)
这是cat mkmf.log:
checking for Ruby version >= 1.8.5... -------------------- yes
--------------------
find_executable: checking for gcc... -------------------- yes
--------------------
find_executable: checking for Magick-config... -------------------- no
--------------------
Can't install RMagick 0.0.0. Can't find Magick-config in /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Run Code Online (Sandbox Code Playgroud)
谁能帮我这个?
Coj*_*nes 27
对于未来遇到这个问题的人:我花了很长时间才修好了.这就是我做的:
sudo apt-get purge imagemagick libmagickcore-dev libmagickwand-devsudo rm -R /usr/include/ImageMagick-6/magicksudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-configsudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev小智 8
我在 mac os 上,但我必须指定版本 6
brew install imagemagick@6
brew link --overwrite --force imagemagick@6
Run Code Online (Sandbox Code Playgroud)
我认为您必须从 ubuntu 存档安装 libmagickwand-dev:
这个包包含使用 MagickWand 编译程序所需的静态库。它包含 MagickWand.h 文件
这是一个依赖于默认量子 libmagickwand 开发文件的过渡包。
sudo apt-get install libmagickwand-dev
Run Code Online (Sandbox Code Playgroud)
安装此依赖项后,您需要安装 rmagick:
gem install rmagick
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9375 次 |
| 最近记录: |