像许多其他人一样,我在运行bundle install时在Ubuntu上安装rmagick时遇到了麻烦.

我在bundle install命令上遇到这个错误:

Installing rmagick (2.13.1) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/local/rvm/rubies/ruby-1.8.7-p371/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.1. Can't find Magick-config in /usr/local/rvm/gems/ruby-1.8.7-p371/bin:/usr/local/rvm/gems/ruby-1.8.7-p371@global/bin:/usr/local/rvm/rubies/ruby-1.8.7-p371/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/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/rvm/rubies/ruby-1.8.7-p371/bin/ruby


Gem files will remain installed in /home/selfsale/.bundler/tmp/2908/gems/rmagick-2.13.1 for inspection.
Results logged to /home/selfsale/.bundler/tmp/2908/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

An error occurred while installing rmagick (2.13.1),and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.

然后我做了一些搜索,并找到了一些添加缺少的库的建议:

sudo apt-get install libmagick9-dev:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libmagick9-dev is not available,but is referred to by another package.
This may mean that the package is missing,has been obsoleted,or
is only available from another source
However the following packages replace it:
  graphicsmagick-libmagick-dev-compat

E: Package 'libmagick9-dev' has no installation candidate

sudo apt-get install graphicsmagick-libmagick-dev-compat:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages Could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 graphicsmagick-libmagick-dev-compat : Depends: libgraphicsmagick1-dev but it is not going to be installed
                                       Depends: libgraphicsmagick++1-dev but it is not going to be installed
E: Unable to correct problems,you have held broken packages.

sudo apt-get install libmagickwand-dev:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages Could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmagickwand-dev : Depends: libmagickcore-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
E: Unable to correct problems,you have held broken packages.

sudo apt-get install libmagickcore-dev:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages Could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmagickcore-dev : Depends: libbz2-dev but it is not going to be installed
                     Depends: libfreetype6-dev but it is not going to be installed
                     Depends: libpng-dev
                     Depends: librsvg2-dev but it is not going to be installed
                     Depends: libwmf-dev but it is not going to be installed
                     Depends: libx11-dev but it is not going to be installed
                     Depends: libxext-dev but it is not going to be installed
                     Depends: libxt-dev but it is not going to be installed
E: Unable to correct problems,you have held broken packages.

sudo apt-get install libmagick -dev:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages Could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmagick++-dev : Depends: libmagickcore-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
                   Depends: libmagickwand-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
E: Unable to correct problems,you have held broken packages.

似乎任何安装正确软件包的尝试都会出现这个问题.

我刚刚看到一篇关于从源代码安装imagemagick的帖子,所以我打算尝试一下,但如果有人有任何更好的想法,我很乐意听到它们.

谢谢

我找到了解决方案:
sudo apt-get install aptitude

然后火:

sudo aptitude install graphicsmagick-libmagick-dev-compat

有人问:

The following actions will resolve these dependencies:
 Keep the following packages at their current version
1)     graphicsmagick-libmagick-dev-compat [Not Installed]
2)     libexif-dev [Not Installed]
3)     libgraphicsmagick++1-dev [Not Installed]
4)     libgraphicsmagick1-dev [Not Installed]

答案:“n”

Accept this solution? [Y/n/q/?] n

在第二个问题:

The following actions will resolve these dependencies:

 Downgrade the following packages: 
1) libexif12 [0.6.20-2ubuntu0.1 (Now) -> 0.6.20-2 (precise)]

答案:“Y”或按ENTER键

Accept this solution? [Y/n/q/?]

等到任务结束;)

Ubuntu 12.10 – Ruby gem rmagick缺少依赖性问题的更多相关文章

  1. ios – ipatool无法使用bitcode构建(xcode 7.1.1)

    在日志中我发现的是:有小费吗?解决方法在管理器上单击“分发应用程序”后,我在XCode10.1上遇到了同样的问题.在我的情况下,这是因为我从我的终端调用XCode并且rvm配置了不同的ruby版本.运行rvm系统为我修复了它.

  2. XCode 3.2 Ruby和Python模板

    在xcode3.2下,我的ObjectiveCPython/Ruby项目仍然可以打开更新和编译,但是你无法创建新项目.鉴于xcode3.2中缺少ruby和python的所有痕迹(即创建项目并添加新的ruby/python文件),是否有一种简单的方法可以再次安装模板?我发现了一些关于将它们复制到某个文件夹的信息,但我似乎无法让它工作,我怀疑文件夹的位置已经改变为3.2.解决方法3.2中的应用程序模板

  3. iOS推送通知适用于Dev而不是Enterprise Distribution

    本网站上没有其他问题,我已经能够找到实际上提出了Dev将工作的原因,但企业分布不会.为什么归档总是使aps环境生产?

  4. ios – 为具有多个目标和不同平台的项目编写Podfile

    如何让CocoaPods成功整合到我的项目和iOS/Mac目标?我已经阅读了Podfile文档,但发现它在这方面缺乏.解决方法得到它了!从我的每个目标和运行的pod安装中删除libPods-xxxx.a文件,再次执行了我的目标集成.

  5. ios – 从Xcode Cocapods插件运行pod安装

    我正在尝试从Xcodecocoapodsplugin运行pod安装命令.当我运行update/installcocoapods命令我得到一个错误:这是奇怪的,如果我去终端中的目录,并运行一个pod安装我没有问题.要注意的是,错误是指Ruby2.0.0,而当我从终端中的目录运行ruby-v命令时,我得到(ruby1.9.3p327(2012-11-10修订版37606)[x86_64-darwin1

  6. ios – testflight库和Xcode 5没有变化现在说“ld:找不到-lTestFlight的库”

    我已经创建了几个月的应用程序,突然Xcode5不想构建它.它只是抱怨以下错误.如果我理解它可以,它会抱怨testflight,但我几周没有改变它.它完美地编译了它.我不得不说我已经尝试将AdobeADMS跟踪库添加到项目中.然后,出现链接器错误.任何提示?

  7. 如何在ios swift项目中为dev n prod使用两个不同的GoogleService-info.plist文件?

    我需要使用两个不同的GoogleService-info.plist来处理dev和prod构建,目前我只是通过在编辑方案中更改“构建配置”来分离dev和prod,但现在我需要有两个不同的.plist文件dev和prod用于处理谷歌分析,pushwoosh等,解决方法对于这种情况,您需要在Dev和Prod的项目中使用带有diffbundleid的不同Targets.之后,您可以链接GoogleSer

  8. Swift中实现ruby中字符串乘法倍增的功能

    hopy;)我们知道在ruby中对于字符串类型我们可以用乘法生成一个指定数量重复的字符串:但在Swift中String默认是没有该实现的,不过要想实现该方法也十分之简单,只要定义一个*法操作符就可以了:

  9. openstack安装liberty--安装对象存储服务swift

    通常使用CACHE技術提高性能Accountservers賬戶服務,管理對象存儲中的賬戶定義。Containerservers容器服務,在對象存儲中管理容器或文件夾映……Objectservers對象服務,在存儲節點管理實際的對象,比如文件。Wsgimiddleware處理認證,通常使用OPENSTACKIdentityswiftclient為用戶提供命令行接口使用RESTAPIswift-init初始化和構建RING文件腳本swift-recon一個命令行工具,用於檢索群集的各種度量和測試信息。

  10. (Cross-)编译Swift for Raspberry PI

    Swift现在是开源的.有没有人试过编译Swift的RaspBerryPI?我开始做,但我的8GBSD卡似乎太小了;)是否可以从Ubuntu交叉编译?写Swift打开你最喜欢的文本编辑器,编写一个程序并保存它:编译它并运行它:而已!

随机推荐

  1. crontab发送一个月份的电子邮件

    ubuntu14.04邮件服务器:Postfixroot收到来自crontab的十几封电子邮件.这些邮件包含PHP警告.>我已经解决了这些警告的原因.>我已修复每个cronjobs不发送电子邮件(输出发送到>/dev/null2>&1)>我删除了之前的所有电子邮件/var/mail/root/var/spool/mail/root但我仍然每小时收到十几封电子邮件.这些电子邮件来自cronjobs,

  2. 模拟两个ubuntu服务器计算机之间的慢速连接

    我想模拟以下场景:假设我有4台ubuntu服务器机器A,B,C和D.我想在机器A和机器C之间减少20%的网络带宽,在A和B之间减少10%.使用网络模拟/限制工具来做到这一点?

  3. ubuntu-12.04 – 如何在ubuntu 12.04中卸载从源安装的redis?

    我从源代码在Ubuntu12.04上安装了redis-server.但在某些时候它无法完全安装,最后一次makeinstallcmd失败.然后我刚刚通过apt包安装.现在我很困惑哪个安装正在运行哪个conf文件?实际上我想卸载/删除通过源安装的所有内容,只是想安装一个包.转到源代码树并尝试以下命令:如果这不起作用,您可以列出软件自行安装所需的步骤:

  4. ubuntu – “apt-get source”无法找到包但“apt-get install”和“apt-get cache”可以找到它

    我正在尝试下载软件包的源代码,但是当我运行时它无法找到.但是当我运行apt-cache搜索squid3时,它会找到它.它也适用于apt-getinstallsquid3.我使用的是Ubuntu11.04服务器,这是我的/etc/apt/sources.list我已经多次更新了.我尝试了很多不同的debs,并没有发现任何其他地方的错误.这里的问题是你的二进制包(deb)与你的源包(deb-src)不

  5. ubuntu – 有没有办法检测nginx何时完成正常关闭?

    &&touchrestarted),因为即使Nginx没有完成其关闭,touch命令也会立即执行.有没有好办法呢?这样的事情怎么样?因此,pgrep将查找任何Nginx进程,而while循环将让它坐在那里直到它们全部消失.你可以改变一些有用的东西,比如睡1;/etc/init.d/Nginx停止,以便它会休眠一秒钟,然后尝试使用init.d脚本停止Nginx.你也可以在某处放置一个计数器,这样你就可以在需要太长时间时发出轰击信号.

  6. ubuntu – 如何将所有外发电子邮件从postfix重定向到单个地址进行测试

    我正在为基于Web的应用程序设置测试服务器,该应用程序发送一些电子邮件通知.有时候测试是使用真实的客户数据进行的,因此我需要保证服务器在我们测试时无法向真实客户发送电子邮件.我想要的是配置postfix,以便它接收任何外发电子邮件并将其重定向到一个电子邮件地址,而不是传递到真正的目的地.我正在运行ubuntu服务器9.10.先感谢您设置本地用户以接收所有被困邮件:你需要在main.cf中添加:然后

  7. ubuntu – vagrant无法连接到虚拟框

    当我使用基本的Vagrantfile,只配置了两条线:我看到我的虚拟框打开,但是我的流氓日志多次显示此行直到超时:然后,超时后的一段时间,虚拟框框终于要求我登录,但是太久了!所以我用流氓/流氓记录.然后在我的物理机器上,如果我“流氓ssh”.没有事情发生,直到:怎么了?

  8. ubuntu – Nginx – 转发HTTP AUTH – 用户?

    我和Nginx和Jenkins有些麻烦.我尝试使用Nginx作为Jenkins实例的反向代理,使用HTTP基本身份验证.它到目前为止工作,但我不知道如何传递带有AUTH用户名的标头?}尝试将此指令添加到您的位置块

  9. Debian / Ubuntu – 删除后如何恢复/ var / cache / apt结构?

    我在ubuntu服务器上的空间不足,所以我做了这个命令以节省空间但是现在在尝试使用apt时,我会收到以下错误:等等显然我删除了一些目录结构.有没有办法做apt-getrebuild-var-tree或类似的?

  10. 检查ubuntu上安装的rubygems版本?

    如何查看我的ubuntu盒子上安装的rubygems版本?只是一个想法,列出已安装的软件包和grep为ruby或宝石或其他:)dpkg–get-selections

返回
顶部