When I try to install ia32-libs in apt gui, it tell me:

ruby-vmc: Depends: ruby-rubyzip2 (>= 2.0.1) but 2.0.1-0ubuntu4 have installed  
          Depends: libhighline-ruby1.9.1 but %s not installed  
          Depends: ruby-rest-client (>= 1.6.1) but 1.6.7-1 have installed  
          Depends: ruby-terminal-table (>= 1.4.2) but 1.4.2-0ubuntu3 have installed  
          Depends: ruby-json-pure (>= 1.5.1) but %s not installed  

Next is the error when I execute: sudo apt-get -f install

installArchives() failed: 
| Collecting changes [0] - Stage 1/5

Committing to: /etc/
modified vmware/vmnet8/dhcpd/dhcpd.leases

| Running pre_commit hooks - Stage 3/5

Committed revision 159.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 491611 files and directories currently installed.)
Unpacking ruby-json-pure (from .../ruby-json-pure_1.5.1-0ubuntu3_all.deb) ...
dpkg: error processing /var/cache/apt/archives/ruby-json-pure_1.5.1-0ubuntu3_all.deb (--unpack):
 trying to overwrite '/usr/lib/ruby/vendor_ruby/json.rb', which is also in package ruby-json 1.6.3-1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
dpkg: dependency problems prevent configuration of ruby-vmc:
 ruby-vmc depends on ruby-json-pure (>= 1.5.1); however:
  Package ruby-json-pure is not installed.
dpkg: error processing ruby-vmc (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cloudfoundry-client:
 cloudfoundry-client depends on ruby-vmc (= 0.3.10-0ubuntu10); however:
  Package ruby-vmc is not configured yet.
dpkg: error processing cloudfoundry-client (--configure):
 dependency problems - leaving unconfigured

When I execute:

sudo apt-get remove ruby-json-pure ruby-json
正在读取软件包列表... 完成
正在读取状态信息... 完成       
**package ruby-json-pure not installed,so it will not be removed**
You maybe use “apt-get -f install” to correct this error:
unsatisfied dependices:
 libjson-ruby : depends on: ruby-json but it will not be installed
 libjson-ruby1.8 : depends on: ruby-json but it will not be installed
 ruby-vmc : depends on: ruby-json-pure (>= 1.5.1) but it will not be installed
E: unsatisfied dependices。Please try to execute “apt-get -f install”。

So now I can not remove or install anything . Please help to solve this problem step by step, thanks.

  • Now I think ruby-vmc caused this problem. But now I can not remove or install anything, So who can tell me how to remove ruby-vmc ruby-json, ruby-json-pure step by step manualy ? Thanks.
    – Michael
    Mar 1, 2013 at 3:35
  • This is the bug report about ruby-vmc: bugs.launchpad.net/ubuntu/+source/ruby-vmc/+bug/1045460
    – Michael
    Mar 1, 2013 at 3:36

2 Answers 2


It looks like you have conflicting repositories configured and packages from those repositories are both trying to install and are conflicting. This is not an simple answer fix. Usually its a step by step of finding which packages conflict, removing them and installing the packages you want. If you are not very familiar with this process, it may be best to ask in a chat channel.

The first step, which I can answer is given in the output you pasted.

dpkg: error processing /var/cache/apt/archives/ruby-json-pure_1.5.1-0ubuntu3_all.deb (--unpack):
  trying to overwrite '/usr/lib/ruby/vendor_ruby/json.rb', which is also in package ruby-json 1.6.3-1

So the ruby-json package is conflicting with the ruby-json-pure package. Whoever made the packages didn't correctly specify the conflicts-with on the package. We should file a bug.

You could start by trying to remove both packages and installing one

$ sudo apt-get remove ruby-json-pure ruby-json

I just tried to unsuccessfully recreate the error on my 12.10 system and I do not have a ruby-json-pure pacakge available. What repositories do you have enabled?

Finally, I'll suggest that instead of using system ruby, you consider using rbenv so that you can have both ruby-json and ruby-json-pure in different environments.

  • Now I even can not remove any packages.
    – Michael
    Mar 1, 2013 at 3:27
  • Yes, that is why I wrote "This is not an simple answer fix." If you join an irc channel someone might be able to walk you through output you see and suggest things to try. Mar 2, 2013 at 14:25
  • Please give me some suggestions about irc channel, thanks very much.
    – Michael
    Mar 6, 2013 at 8:59

It will happens when you accidentally install to architect or version of same package in your system. Use synaptic application in broken packages ( at left column ) choose fix it and also you can use apt-get -f to fix it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .