在ubuntu 14.04上安装rmagick gem

 手机用户2502917325 发布于 2022-12-19 11:22

我正在尝试在OpsWorks上部署应用程序,但是安装rmagick gem时存在问题.我有以下操作系统包:

libmagickwand-dev imagemagick libmagickcore-dev

以下是部署期间出错的日志文件:

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 /home/deploy/.bundler/myapp/ruby/2.1.0/gems/rmagick-2.13.3 for inspection.
Results logged to /home/deploy/.bundler/myapp/ruby/2.1.0/extensions/x86_64-linux/2.1.0/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.
STDERR:
---- End output of sudo su - deploy -c 'cd /srv/www/myapp/releases/20140929182350 && /usr/local/bin/bundle install --path /home/deploy/.bundler/myapp --without=test development' 2>&1 ----
Ran sudo su - deploy -c 'cd /srv/www/myapp/releases/20140929182350 && /usr/local/bin/bundle install --path /home/deploy/.bundler/myapp --without=test development' 2>&1 returned 5
[2014-09-29T18:24:08+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

S C.. 26

在shell中,运行以下命令:

apt-get install libmagickwand-dev


小智.. 8

将ubuntu升级到15.05之后我遇到了同样的问题,有些Magick-config文件不再在我的PATH中了.为了解决这个问题,我首先找到了它的位置Magick-config

sudo find / -name "Magick-config"

这是/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config后来我把它添加到路径.随后捆绑成功.

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有