1

I have a dependency loop that I cannot figure out how to get around and it is keeping me from upgrading.

I am currently on 14.04 and want to move to 16.04. Further below is a showing of what I have been trying, unsuccessfully. And at any point through the workings, if I do the apt-get -f install, then the whole mess is right back at the start of the problem.

But firstly, let me shortcut to the specific question and then if you want to know the why and how of the question, see below.

QUESTION: How can I move the package gcc-4.8-base from version 14.04.3 to 14.04.1? Just simply giving the desired version is not enough, the older package doesn't exist on my machine and I have no idea where and how to get that older package.

This is how I have arrived at needing to answer the above question and if you see a different solution to the problem, I am all ears (eyes at it were):

sudo apt-get update

This works fine. Then upgrade:

sudo apt-get upgrade

This fails with:

The following packages have unmet dependencies:
 libstdc++-4.8-dev : Depends: libstdc++6 (>= 4.8.4-2ubuntu1~14.04.3) but 4.8.4-2ubuntu1~14.04.1 is installed
 libstdc++6 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04.1) but 4.8.4-2ubuntu1~14.04.3 is installed
E: Unmet dependencies. Try using -f.

So as suggested try with the -f option:

sudo apt-get upgrade -f

And after several minutes of fetching finally fails with:

Preparing to unpack .../libstdc++6_4.8.4-2ubuntu1~14.04.3_i386.deb ...
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_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

My thought at this point is get rid of libstdc++6-armhf-cross, I don't currently need to do any cross-compiling and in the future, if I do, I'll look at bringing it back in:

sudo apt-get remove --purge libstdc++6-armhf-cross libstdc++-4.8-dev-armhf-cross g++-4.8-arm-linux-gnueabihf libsfstdc++-4.8-dev-armhf-cross g++-4.8-multilib-arm-linux-gnueabihf libstdc++-4.8-dev g++-4.8 g++-arm-linux-gnueabihf g++ build-essential

This runs fine and so back to the upgrade:

sudo apt-get upgrade

Well, it still fails, only this time on a different package:

The following packages have unmet dependencies:
 libstdc++-4.8-dev : Depends: libstdc++6 (>= 4.8.4-2ubuntu1~14.04.3) but 4.8.4-2ubuntu1~14.04.1 is installed
 libstdc++6 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04.1) but 4.8.4-2ubuntu1~14.04.3 is installed
E: Unmet dependencies. Try using -f.

And using the -f option:

sudo apt-get upgrade -f

Fails again with:

Preparing to unpack .../libstdc++6_4.8.4-2ubuntu1~14.04.3_i386.deb ...
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_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

So, get rid of gcc-4.8-base? Nope, that ain't happening, it is a dependency to libstdc++6, hence the circular dependency. The only solution I can think of is trying to move gcc-4.8-base back to version 14.03.1 and then upgrading from there, hence the original question above.

As per suggestion from Scott, I also began to try his sequence but the very first command failed:

sudo dpkg --configure -a

Failed with:

dpkg: dependency problems prevent configuration of libstdc++-4.8-dev:i386:
 libstdc++-4.8-dev:i386 depends on libstdc++6 (>= 4.8.4-2ubuntu1~14.04.3); however:
  Version of libstdc++6:i386 on system is 4.8.4-2ubuntu1~14.04.1.

dpkg: error processing package libstdc++-4.8-dev:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of g++-4.8:
 g++-4.8 depends on libstdc++-4.8-dev (= 4.8.4-2ubuntu1~14.04.3); however:
  Package libstdc++-4.8-dev:i386 is not configured yet.

dpkg: error processing package g++-4.8 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libstdc++-4.8-dev:i386
 g++-4.8
Chai T. Rex
  • 5,193
MadMan
  • 11
  • Is it possible to short this down a bit? You know us kids nowadays and our shortened attention span :-) – Promille Dec 14 '16 at 18:31
  • You likely should be fully updated first, i.e. to *~14.04.3 & anything/everything else fully updated before attempting a release upgrade. As far as libstdc++6-armhf-cross - there was a bug in 0.11.1 - https://bugs.launchpad.net/ubuntu/+source/gcc-4.8-armhf-cross/+bug/1557205 You should enable the -Updates & -Security repos & run an apt-get update & apt-get upgrade. The current version is 0.11.2 – doug Dec 14 '16 at 18:32
  • Doug, I am trying to update and upgrade...see the long bit that Promille asked me to reduce...there in lies the problem. I can update fine, but upgrade fails. More specifically, the problem appeared when I wanted to update from 14.04 to 16.04 so step one was to update my system then upgrade. And while I understand the concern of a bug, I can simply eliminate armhf-cross, but that doesn't resolve the dependency loop that is locking everything up, so I don't see how a bug in it could be triggering the dependency loop. – MadMan Dec 14 '16 at 19:28
  • I mean update 14.04 itself. As I mentioned you're behind on some packages. You should make sure both those update repos are enabled. Are they?? – doug Dec 14 '16 at 21:59
  • For non-inline output, please use the {} button in the editor rather than backticks. – Chai T. Rex Dec 15 '16 at 05:39

1 Answers1

0

Notice in your latest update mention of i386 ... to simplify your challenge first remove your multi architecture ... remove all 32 bit packages

sudo apt-get remove --purge `dpkg --get-selections | grep i386 | awk '{print $1}'`

then multi arch itself

sudo dpkg --remove-architecture i386

then issue

sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo dpkg --configure --pending
sudo dpkg -C  # audit -
  • sudo dpkg --configure -a fails! – MadMan Dec 14 '16 at 19:20
  • More specifically, see the edit above on the post...added to the end. – MadMan Dec 14 '16 at 19:29
  • Still no good, the remove has a run-on of a long list of 'this : Depends: that'. I am about to give up, pull my home directory off and just do a complete wipe and install of 16.04. I'm afraid part of what may be problematic here is that this was a 12.10 system that was then updated to 14.04, had support put on for working with a BeagleBone (ARM) and now trying to make it to 16.04 is just too confusing. – MadMan Dec 14 '16 at 20:53
  • In the long run, reinstalling Linux from scratch does have one plus, it will let me move to 64bit instead of 32 bit. – MadMan Dec 14 '16 at 21:05