Debian

Aptitude safe-upgrade: errors were encountered while processing bison

A few days ago, as I was doing my periodic aptitude safe-upgrade, I got the following (irrelevant parts omitted):

$ sudo aptitude safe-upgrade
 
Unpacking libbison-dev (from .../libbison-dev_1%3a2.5.dfsg-2_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libbison-dev_1%3a2.5.dfsg-2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/liby.a', which is also in package liby-dev 1:2.5.dfsg-1
configured to not write apport reports
                                      dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
 
...
 
Errors were encountered while processing:
 /var/cache/apt/archives/libbison-dev_1%3a2.5.dfsg-2_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 bison:
 bison depends on libbison-dev (= 1:2.5.dfsg-2); however:
  Package libbison-dev is not installed.
dpkg: error processing bison (--configure):
 dependency problems - leaving unconfigured
 
...
 
Errors were encountered while processing:
 bison

In fact, liby-dev has been renamed to libbison-dev to avoid name conflict with Y sound server library header files, but some fields are missing from the package control file (Provides, Conflicts and Replaces).

The correct way to rename a package is documented in the Debian Developer’s Reference in section 5.9.3. Replacing or renaming packages, and in the Debian Policy Manual in section 7.6 Overwriting files and replacing packages.

Anyway, if you don’t want to wait for the problem to get fixed, there’s a workaround:

$ sudo aptitude purge liby-dev bison
The following packages will be REMOVED:  
  bison{p} liby-dev{p} 
0 packages upgraded, 0 newly installed, 2 to remove and 50 not upgraded.
Need to get 0 B of archives. After unpacking 2216 kB will be freed.
Do you want to continue? [Y/n/?] 
(Reading database ... 166621 files and directories currently installed.)
Removing bison ...
Removing liby-dev ...
Processing triggers for man-db ...
 
Current status: 0 broken [-1].
 
$ sudo aptitude install bison
The following NEW packages will be installed:
  bison libbison-dev{a} 
0 packages upgraded, 2 newly installed, 0 to remove and 50 not upgraded.
Need to get 0 B/981 kB of archives. After unpacking 2216 kB will be used.
Do you want to continue? [Y/n/?] 
(Reading database ... 166516 files and directories currently installed.)
Unpacking libbison-dev (from .../libbison-dev_1%3a2.5.dfsg-2_amd64.deb) ...
Selecting previously unselected package bison.
Unpacking bison (from .../bison_1%3a2.5.dfsg-2_amd64.deb) ...
Processing triggers for man-db ...
Setting up libbison-dev (1:2.5.dfsg-2) ...
Setting up bison (1:2.5.dfsg-2) ...

You can also check the following Debian bugs: #645038, #645047 and #645086 (which have been merged).

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

*Required Fields