how to resolve libjson-ruby and ruby-json package conflict?

Asked by Ivan Storck

I am trying to install chef (client) on my ubuntu server but I am getting an error from aptitude that I would love some help understanding. I have searched on Google and Ubuntu forums for the answer but I did not see anything relevant yet.

It seems like aptitude thinks I need both libsjon-ruby and also ruby-json but they seem to conflict.

Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-12-generic x86_64)

 * Documentation: https://help.ubuntu.com/

deploy@server:~$ sudo aptitude full-upgrade
[sudo] password for deploy:
The following packages will be upgraded:
  at-spi2-core baobab cups cups-bsd cups-client cups-common cups-ppdc
  desktop-file-utils empathy empathy-common file-roller gedit gedit-common
  gir1.2-atspi-2.0 gir1.2-gtk-3.0 gir1.2-totem-1.0
  gnome-accessibility-themes gnome-control-center gnome-control-center-data
  gnome-font-viewer gnome-games-common gnome-icon-theme
  gnome-icon-theme-full gnome-keyring gnome-mahjongg gnome-online-accounts
  gnome-screenshot gnome-search-tool gnome-session gnome-session-bin
  gnome-session-canberra gnome-session-common gnome-sudoku gnome-system-log
  gnome-utils-common gnomine indicator-session initramfs-tools
  initramfs-tools-bin libatspi2.0-0 libcanberra-gtk-module libcanberra-gtk0
  libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-pulse libcanberra0
  libcups2 libcupscgi1 libcupsdriver1 libcupsimage2 libcupsmime1
  libcupsppdc1 libgail-3-0 libgail-3-common libgck-1-0 libgcr-3-1
  libgnome-control-center1 libgoa-1.0-0 libgtk-3-0 libgtk-3-bin
  libgtk-3-common libnautilus-extension1 libpam-gnome-keyring
  libpam-modules libpam-modules-bin libpam-runtime libtotem0 nautilus
  nautilus-data nautilus-sendto-empathy python-cupshelpers python-gobject
  python-gobject-cairo python-pyatspi2 quadrapassel seahorse
  software-center system-config-printer-common system-config-printer-gnome
  system-config-printer-udev telepathy-indicator tomboy totem totem-common
  totem-mozilla totem-plugins vinagre
The following partially installed packages will be configured:
  chef libjson-ruby{b}
87 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/33.2 MB of archives. After unpacking 102 kB will be used.
The following packages have unmet dependencies:
  libjson-ruby: Depends: ruby-json but it is not going to be installed.
The following actions will resolve these dependencies:

     Remove the following packages:
1) chef
2) libjson-ruby
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Install the following packages:
1) ruby-json [1.5.3-1 (oneiric)]

Accept this solution? [Y/n/q/?] Y
The following NEW packages will be installed:
  ruby-json{a}
The following packages will be upgraded:
  at-spi2-core baobab cups cups-bsd cups-client cups-common cups-ppdc
  desktop-file-utils empathy empathy-common file-roller gedit gedit-common
  gir1.2-atspi-2.0 gir1.2-gtk-3.0 gir1.2-totem-1.0
  gnome-accessibility-themes gnome-control-center gnome-control-center-data
  gnome-font-viewer gnome-games-common gnome-icon-theme
  gnome-icon-theme-full gnome-keyring gnome-mahjongg gnome-online-accounts
  gnome-screenshot gnome-search-tool gnome-session gnome-session-bin
  gnome-session-canberra gnome-session-common gnome-sudoku gnome-system-log
  gnome-utils-common gnomine indicator-session initramfs-tools
  initramfs-tools-bin libatspi2.0-0 libcanberra-gtk-module libcanberra-gtk0
  libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-pulse libcanberra0
  libcups2 libcupscgi1 libcupsdriver1 libcupsimage2 libcupsmime1
  libcupsppdc1 libgail-3-0 libgail-3-common libgck-1-0 libgcr-3-1
  libgnome-control-center1 libgoa-1.0-0 libgtk-3-0 libgtk-3-bin
  libgtk-3-common libnautilus-extension1 libpam-gnome-keyring
  libpam-modules libpam-modules-bin libpam-runtime libtotem0 nautilus
  nautilus-data nautilus-sendto-empathy python-cupshelpers python-gobject
  python-gobject-cairo python-pyatspi2 quadrapassel seahorse
  software-center system-config-printer-common system-config-printer-gnome
  system-config-printer-udev telepathy-indicator tomboy totem totem-common
  totem-mozilla totem-plugins vinagre
The following partially installed packages will be configured:
  chef libjson-ruby
87 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/33.3 MB of archives. After unpacking 418 kB will be used.
Do you want to continue? [Y/n/?]
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 246692 files and directories currently installed.)
Unpacking ruby-json (from .../ruby-json_1.5.3-1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/ruby-json_1.5.3-1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/ruby/vendor_ruby/json.rb', which is also in package ruby-json-pure 1.5.1-0ubuntu3
No apport report written because MaxReports is reached already
                                                              Preparing to replace libpam-modules-bin 1.1.3-2ubuntu1 (using .../libpam-modules-bin_1.1.3-2ubuntu2.1_amd64.deb) ...
Unpacking replacement libpam-modules-bin ...
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/ruby-json_1.5.3-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
dpkg: dependency problems prevent configuration of libjson-ruby:
 libjson-ruby depends on ruby-json; however:
  Package ruby-json is not installed.
dpkg: error processing libjson-ruby (--configure):
 dependency problems - leaving unconfigured
Setting up libpam-modules-bin (1.1.3-2ubuntu2.1) ...
dpkg: dependency problems prevent configuration of chef:
 chef depends on libjson-ruby (>= 1.4.4); however:
  Package libjson-ruby is not configured yet.
dpkg: error processing chef (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libjson-ruby
 chef

Current status: 2 broken [+1], 86 updates [-1].

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu aptitude Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.