I'm trying to do sudo apt-get dist-upgrade
for upgrades all of the packages on the Linux system (14.04). In the middle, it gave an error and I ran sudo apt-get install -f
, the PC got rebooted and went into recovery mode.
Tried to open Ubuntu it’s giving like:
Then it’s going to another window for login:
In this, it is showing Ubuntu 16.04 LTS but I only use command sudo apt-get dist-upgrade
. My OS is Ubuntu 14.04, why is it showing 16.04? This sudo apt-get dist-upgrade
command is for kernel upgrades all of the packages in Linux system. Why is this happening?
After logged in, it’s giving apt-get: relocation error
:
Error message after login:
$ apt apt: 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 referenc
Methods tried to solve the error:
1:
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
It is giving the response no file or directory like this is not there.
2: Then I tried this way
# ls /usr/lib/x86_64-linux-gnu/libstdc++.so.6*
libstdc++.so.6 -> libstdc++.so.6cd*
libstdc++.so.6.0.20*
libstdc++.so.6.0.21
libstdc++.so.6cd -> libstdc++.so.6.0.20*
Which giving response permission denied.
3: For this commands, it’s giving the response command not found.
gcc-5-base_5.4.0-6ubuntu1~16.04.4_i386.deb
libstdc++6_5.4.0-6ubuntu1~16.04.4_i386.deb
For me no need to update PC to 16.04. I just want to update the kernel modules. How can I solve this apt-get relocation error without loss of data in Ubuntu 14.04?
/etc/apt/sources.list
. The upgrade might not be done correctly but since you can log in to the terminal, everything can be fixed using the right commands. – Melebius Sep 06 '18 at 08:12/etc/apt/sources.list
first, whether it points totrusty
orxenial
. If you’re in doubt, add the contents to your question. – Melebius Sep 06 '18 at 09:11/etc/apt/sources.list
or in a file in the sources.list.d/ subdirectory) that has caused the dist-upgrade to include xenial sources (thus [part] jump you to xenial/16.04). If yougrep xenial /etc/apt/sources.list
you should get no output (inc. the subdir), but I suspect you do have output (or 16.04 sources) which is I believe the cause for issues. – guiverc Sep 11 '18 at 01:54