Install libstdc++6-armhf-cross fails because of file conflict with another package

Asked by csmcd5

My problem originated when I did "apt-get upgrade firefox". Apparently a series of dependencies led to the install of gcc-4.8-armhf-cross, which was not previously installed. Now my system is dead in the water because libstdc++6-armhf-cross contains a file /usr/share/gcc-4.8/python/libstdcxx/__init__.py which already exists in a different package. Might anyone know what is going on here and how to get around it? Uninstalling firefox (and eventually everything I could find that was gcc or arm related) did not help.

Thanks,
Curt

% sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libstdc++6-armhf-cross
The following NEW packages will be installed:
  libstdc++6-armhf-cross
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
35 not fully installed or removed.
Need to get 0 B/210 kB of archives.
After this operation, 749 kB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 151717 files and directories currently installed.)
Preparing to unpack .../libstdc++6-armhf-cross_4.8.4-2ubuntu1~14.04.1cross0.11.1_all.deb ...
Unpacking libstdc++6-armhf-cross (4.8.4-2ubuntu1~14.04.1cross0.11.1) ...
dpkg: error processing archive /var/cache/apt/archives/libstdc++6-armhf-cross_4.8.4-2ubuntu1~14.04.1cross0.11.1_all.deb (--unpack):
 trying to overwrite '/usr/share/gcc-4.8/python/libstdcxx/__init__.py', which is also in package libstdc++6:amd64 4.8.4-2ubuntu1~14.04.1
Errors were encountered while processing:
 /var/cache/apt/archives/libstdc++6-armhf-cross_4.8.4-2ubuntu1~14.04.1cross0.11.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gcc-4.8-armhf-cross Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

sudo dpkg --force-all -i /var/cache/apt/archives/libstdc++6-armhf-cross_4.8.4-2ubuntu1~14.04.1cross0.11.1_all.deb

Will make the package install. You can then run:

sudo apt-get -f install

to keep the install going. I suggest you report a bug for the package. Dpkg doesn't like overlapping packages. I suspect you have some PPAs added to your system.

Revision history for this message
csmcd5 (geek-n) said :
#2

Thank you. This worked for me. A co-worker sent me that exact same command line and I appended it to the bug report. However, the command did not work for another co-worker. Another command listed in the bug report is:

sudo apt-get -o Dpkg::Options::="--force-overwrite" install -f

Revision history for this message
csmcd5 (geek-n) said :
#3

Thanks actionparsnip, that solved my question.