Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RESOLVED] apt-get: relocation error on dist-upgrade to Xenial #1216

Closed
aseering opened this issue Oct 16, 2016 · 12 comments
Closed

[RESOLVED] apt-get: relocation error on dist-upgrade to Xenial #1216

aseering opened this issue Oct 16, 2016 · 12 comments

Comments

@aseering
Copy link
Contributor

I'm creating a cross-reference for this failure: The root cause (and the fix) is upstream, but I just hit it and looked for the solution here; I'm filing this ticket so that others who look for the fix here can find it.

WSL forum mods, feel free to close this either right away (since I think there's no action for the WSL team to take here) or once most people have upgraded to 16.04.

I recently ran do-release-upgrade to upgrade to Xenial. After the upgrade, many commands, including apt-get, failed with:

$ sudo apt-get install dialog
apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0: symbol _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

This is caused by Ubuntu #1572903. The workaround listed there, which worked for me, is as follows:

wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.2_amd64.deb
sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.2_amd64.deb
@raymens
Copy link

raymens commented Apr 10, 2017

I just hit this on 15063.13 after a do-release-upgrade. Updated workaround (package build has been updated):

wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb
sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb

@HLFH
Copy link

HLFH commented Apr 19, 2017

Thank you @raymens. It works.

We can close this issue.

@sunilmut sunilmut reopened this Apr 19, 2017
@zkawan
Copy link

zkawan commented Sep 15, 2017

When I run that wget command it results into error :
Resolving security.ubuntu.com failed. Temporary failure in name resolution

@zkawan
Copy link

zkawan commented Sep 15, 2017

Now it says Error 404 not found.

@xiadingZ
Copy link

xiadingZ commented Jan 6, 2018

when I run sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb, there is a error:

dpkg: warning: downgrading libstdc++6:amd64 from 7.2.0-1ubuntu1~14.04 to 5.4.0-6ubuntu1~16.04.4
dpkg: regarding libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb containing libstdc++6:amd64:
 libstdc++6:amd64 breaks libboost-date-time1.55.0
  libboost-date-time1.55.0:amd64 (version 1.55.0-1) is present and installed.

dpkg: error processing archive libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb (--install):
 installing libstdc++6:amd64 would break libboost-date-time1.55.0:amd64, and
 deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
 libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb

@therealkenc
Copy link
Collaborator

These are user space apt and dpkg issues not WSL actionables. The above one looks like this maybe, but that's just because I Googled. Maybe someone will jump in, but you'll probably get better service in a Ubuntu forum or libstdc++ forum.

@gumb0
Copy link

gumb0 commented Mar 10, 2020

I've hit it just now, and here's the updated workaround that worked for me:

wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.12_amd64.deb
sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.12_amd64.deb

@fabianlee
Copy link

Thanks, @gumb0 the libstdc library you referenced above resolved my upgrade from 14.04 to 16.04 (desktop was cycling through login).

@jca-agnitio
Copy link

Thanks @gumb0 , that worked for me too.

@rush5150
Copy link

I signed up just to add @gumb0 this still works.

Thank you for the help.

@Shrek-DevMasterRobo
Copy link

I've hit it just now, and here's the updated workaround that worked for me:

wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.12_amd64.deb
sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.12_amd64.deb

Thanks a lot for this, After going through on this for hours, finally found a solution that worked. Thanks a lot.

@ferdymercury
Copy link

ferdymercury commented Oct 28, 2022

Thanks a lot for the hint. I had to combine it with a bit more work to install other conflicting related packages: https://askubuntu.com/a/1437932/1179344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests