update-alternatives: error: alternative ri can't be slave of ruby: it is a master alternative.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ri (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This is similar to bug 874343, but I was able to fix that one on my own (it was fixed by removing some ruby 1.9.2 packages). The story is that I just upgrade to 11.10, but ran in to a problem during the upgrade: a bunch of ruby packages refused to install. I cleaned up and finished the installation otherwise, and removed the offending packages to get to the root of the problem. If I try to install the 'ruby' package I now get:
leon@leon-
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
ruby1.8
Suggested packages:
ri ruby-dev ruby1.8-examples ri1.8
The following NEW packages will be installed:
ruby ruby1.8
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 40.7 kB of archives.
After this operation, 475 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://
Get:2 http://
Fetched 40.7 kB in 0s (299 kB/s)
Selecting previously deselected package ruby1.8.
(Reading database ... 389516 files and directories currently installed.)
Unpacking ruby1.8 (from .../ruby1.
Selecting previously deselected package ruby.
Unpacking ruby (from .../apt/
Processing triggers for menu ...
Processing triggers for man-db ...
Setting up ruby1.8 (1.8.7.352-2) ...
update-
dpkg: error processing ruby1.8 (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of ruby:
ruby depends on ruby1.8 (>> 1.8.7.334-1); however:
Package ruby1.8 is not configured yet.
dpkg: error processing ruby (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
ruby1.8
ruby
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any advice?
Looks like the solution was running
sudo update-alternatives --remove ri /usr/bin/ri1.8
Before that, if I listed the alternatives for ri I'd see:
leon@leon- desktop: ~$ sudo update-alternatives --list ri alternatives: warning: alternative /usr/bin/ri1.8 (part of link group ri) doesn't exist. Removing from list of alternatives.
update-
I could run that multiple times, and each time it'd say that it was removing /usr/bin/ri1.8 from the list of alternatives, but it didn't remove it until I told it to with the first command.
I'm not sure why all this was necessary. I don't think my installation was special, but maybe it was.