Need assistance on Relocation error

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
rankitt
Level 1
Level 1
Posts: 1
Joined: Thu Jun 09, 2016 11:46 pm

Need assistance on Relocation error

Post by rankitt »

Hello people I am new to Linux and learning I installed mint on my surface book and was installing some apps and after that I am contantly getting this error and need your assistance on the same. Below is the error I get when ever I type apt-get install

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


Really appreciate your help its been almost more than 2 days I am trying to solve this error but no luck

Regards,
Rankit
Elizine
Level 1
Level 1
Posts: 29
Joined: Wed Feb 10, 2016 11:29 pm

Re: Need assistance on Relocation error

Post by Elizine »

There are some remains, specifically

Code: Select all

/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
from the PPA for Ubuntu Toolchain Uploads (restricted).

Removing this PPA with all of it's packages via

Code: Select all

sudo ppa-purge ppa:ubuntu-toolchain-r/test
will fix the issues.
bobdotexe
Level 1
Level 1
Posts: 2
Joined: Thu Apr 30, 2015 1:22 pm

Re: Need assistance on Relocation error

Post by bobdotexe »

It should be noted that ppa-purge Dose not come pre-installed.

Also, from my testing, 'PPA-purge' require APT to be working.

If you reboot your PC after getting the APT error, you may not be able to load the GUI, so you'll need to open a terminal with ctrl+shift+f2, log in, then you can attempt to fix it.

Here's what worked for me:

From terminal, download a copy of libstdc++6. You can find the page for it here: http://packages.ubuntu.com/search?keywo ... tdc%2B%2B6

From that page, you'll see a few listings under 'Exact hits' Find the Ubuntu version that matches what version of linux mint you have.

For example the newest Linux mint 16 uses 'Ubuntu xenial' as it's base, once you click the link, you will be taken to a new page, scroll down to 'Download libstdc++6' from there pick the version that matches your install. (for example 'amd64' for a 64bit install of mint, or 'i386' for a 32 bit install)

Clicking that would take you to a new page, half way down, you'll see a link called 'security.ubuntu.com/ubuntu' that will let you download your package.

If you're doing all these steps on a separate PC, it's much faster to just download the package on your mint computer via terminal.
And to save on typing, I'd suggest coping the download link: [example: http://security.ubuntu.com/ubuntu/pool/ ... _amd64.deb]
And running it through the website: https://goo.gl/ that will give you a shorter [Case sensitive] version, in my case, I got: http://goo.gl/idYHYB.

Now go you your mint pc and type in:

Code: Select all

wget http://goo.gl/idYHYB -O fix.deb

Replacing the URL with the one you generated.

Next, run:

Code: Select all

sudo dpkg -i fix.deb

That will install the proper libraries, so we'll be able to use APT again.

At this point it would be a good idea to remove the bad ppa, you can manually install ppa purge: http://packages.ubuntu.com/search?suite ... chon=names

then running:

Code: Select all

sudo ppa-purge ppa:ubuntu-toolchain-r/test


sudo apt-add-repository --remove ppa:ubuntu-toolchain-r/test
Or delete the file from: /etc/apt/sources.list.d

I just deleted the file.

Next run:

Code: Select all

 sudo apt-get update
 sudo apt-get -f install 
 sudo apt-get upgrade -y
 sudo reboot
 

Then you should be back in business!

I'd suggest throwing in an extra:

Code: Select all

sudo dpkg —configure -a
after the reboot, but it's not required

This may not work for you, but it fixed my setup! even when lightdm failed to load all the way!

Feel free to link this, or repost it anywhere if it helps,
I was unable to find a working process anywhere online, and ended up combining the processess of like 8 threads together. :P
kitkatm
Level 1
Level 1
Posts: 1
Joined: Wed Aug 03, 2016 11:01 am

Re: Need assistance on Relocation error

Post by kitkatm »

Thanks for the helpful instructions.
Post Reply

Return to “Software & Applications”