0

I reactivated an old virtual machine with Ubuntu 14. It immediately greeted me with a list of updates and then failed telling me:

Check if you are using third party repositories. If so disable them, since they >are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f

After running the suggested command I get the following:

sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  antlr3 aspectj bsh default-jdk-doc gcj-4.8-jre-lib javahelp2 jetty jsvc
  junit4 junit4-doc libantlr-java libasm3-java libaspectj-java
  libbeansbinding-java libbetter-appframework-java libbindex-java libbsh-java
  libbytelist-java libcglib-java libcommons-beanutils-java
  libcommons-codec-java libcommons-collections3-java libcommons-compress-java
  libcommons-daemon-java libcommons-digester-java libcommons-net1-java
  libdb-java libdb-je-java libdb5.3-java libdb5.3-java-jni libeasymock-java
  libfelix-framework-java libfelix-main-java libflute-java libfreemarker-java
  libgcj-bc libgcj-common libgcj14 libgeronimo-jpa-2.0-spec-java
  libgeronimo-osgi-support-java libhamcrest-java libhamcrest-java-doc
  libicu4j-java libini4j-java libjcodings-java libjemmy2-java libjetty-java
  libjline-java libjna-java libjoda-convert-java libjoda-time-java
  libjtidy-java libjvyamlb-java libjzlib-java liblucene2-java libmysql-java
  libnb-absolutelayout-java libnb-apisupport3-java libnb-ide14-java
  libnb-java5-java libnb-javaparser-java libnb-org-openide-modules-java
  libnb-org-openide-util-java libnb-org-openide-util-lookup-java
  libnb-platform-devel-java libnb-platform13-java libnetx-java
  libosgi-compendium-java libosgi-core-java libosgi-foundation-ee-java
  libpostgresql-jdbc-java libsac-java libsac-java-gcj libsequence-library-java
  libservlet2.5-java libsimple-validation-java libslf4j-java libsqljet-java
  libstringtemplate-java libsvn-java libsvnclientadapter-java libsvnkit-java
  libswing-layout-java libswingx1-java libtrilead-ssh2-java libxz-java
  openjdk-7-doc
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libstdc++6 libstdc++6:i386
The following packages will be upgraded:
  libstdc++6 libstdc++6:i386
2 upgraded, 0 newly installed, 0 to remove and 518 not upgraded.
45 not fully installed or removed.
Need to get 0 B/528 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 245510 files and directories currently installed.)
Preparing to unpack .../libstdc++6_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
De-configuring libstdc++6:i386 (4.8.4-2ubuntu1~14.04.1) ...
Unpacking libstdc++6:amd64 (4.8.4-2ubuntu1~14.04.3) over (4.8.4-2ubuntu1~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libstdc++6_4.8.4-2ubuntu1~14.04.3_amd64.deb (--unpack):
 trying to overwrite '/usr/share/gcc-4.8/python/libstdcxx/__init__.py', which is also in package libstdc++6-armhf-cross 4.8.4-2ubuntu1~14.04.1cross0.11.1
Preparing to unpack .../libstdc++6_4.8.4-2ubuntu1~14.04.3_i386.deb ...
De-configuring libstdc++6:amd64 (4.8.4-2ubuntu1~14.04.1) ...
Unpacking libstdc++6:i386 (4.8.4-2ubuntu1~14.04.3) over (4.8.4-2ubuntu1~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libstdc++6_4.8.4-2ubuntu1~14.04.3_i386.deb (--unpack):
 trying to overwrite '/usr/share/gcc-4.8/python/libstdcxx/__init__.py', which is also in package libstdc++6-armhf-cross 4.8.4-2ubuntu1~14.04.1cross0.11.1
Errors were encountered while processing:
 /var/cache/apt/archives/libstdc++6_4.8.4-2ubuntu1~14.04.3_amd64.deb
 /var/cache/apt/archives/libstdc++6_4.8.4-2ubuntu1~14.04.3_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I resolve this problem? I don't think I ever installed or changed anything manually except the Virtual Box guest tools. It just broke itself.

Edit: apt sources.lst:

# deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://nz.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://nz.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://nz.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://nz.archive.ubuntu.com/ubuntu/ trusty universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://nz.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://nz.archive.ubuntu.com/ubuntu/ trusty multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.


## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb http://nz.archive.ubuntu.com/ubuntu/ trusty-updates multiverse main universe restricted
deb http://security.ubuntu.com/ubuntu/ trusty-security multiverse main universe restricted
deb-src http://extras.ubuntu.com/ubuntu trusty main

Edit2: This has resolved the issue:

sudo dpkg --force-all --purge libstdc++6-armhf-cross

  • Looks like some armf cross compiling got mixed up into your system. Try removing those packages, then upgrade. – ubfan1 Jan 24 '18 at 0:57
  • Thank you. I didn't really realize that this was the issue. sudo dpkg --force-all --purge libstdc++6-armhf-cross seem to have solved it – Luz Jan 24 '18 at 1:22
  • Using --force, while it does indeed fix today's problem, may create other problems tomorrow. Not a recommended solution for new or unskilled users who see this question in the future. – user535733 Jan 24 '18 at 4:33
  • I wasn't able to delete it without --force-all. What would be a proper save way of doing it? – Luz Jan 26 '18 at 1:17
1

From the error messages, it looks like some armf cross compiling got mixed up into your system. Try removing those packages, then upgrade.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.