LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   APT error and Command Line help. apt-get not working (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/apt-error-and-command-line-help-apt-get-not-working-4175647998/)

Rookes123 02-10-2019 12:52 AM

APT error and Command Line help. apt-get not working
 
0


My apt will not run any command, e.g. sudo apt-get ____. The error message I am getting is-

relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZN13pkgSourceList16AddVolatileFilesER11CommandLinePSt6vectorINSt7__cxx1112basic_stringIcSt11char_tr aitsIcESaIcEEESaIS8_EE version APTKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference

Info- Im running Ubuntu 18.04 bionic. running[dpkg -l apt libapt-pkg5.0] shows the following-- "Apt running on- 1.4.6~17.04.1" "libapt=pkg5.0:amd64 running on- 1.2.29"

running [md5sum /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0 /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0] Shows- "868c9bb9cd23bacc2f76182902eb489d /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0" "12e8c8000ae4f61d6ec50ca9218b428d /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0 "

I only have access to recovery mode and Cntrl+Alt+F1 can someone please help me?

descendant_command 02-10-2019 01:06 AM

Been mixing repo's eh?
TBH if apt is hosed, unless you want to spend a long time learning new things, you should probably just reinstall.

Rookes123 02-10-2019 01:11 AM

Quote:

Originally Posted by descendant_command (Post 5960058)
Been mixing repo's eh?
TBH if apt is hosed, unless you want to spend a long time learning new things, you should probably just reinstall.

would there be a way to reinstall without losing personal data and can you tell me how?

descendant_command 02-10-2019 01:15 AM

Well that really depends how your system is set up and what backup strategy you are using.
Worst case - no separate /home partition and no backup (come on - it's 2019!) - boot from a live system disk/usb and copy off what you need to an external drive or such.

Rookes123 02-10-2019 01:20 AM

is there no way to fix the apt error?

descendant_command 02-10-2019 01:38 AM

Yes, there very probably is.
Again, it depends ... on how you got in this situation and what other damage has been done.

Rookes123 02-10-2019 02:20 AM

I got into this situation from updating from 17.04 - 18.04 via the update gui and when it got to the resating phase of the updates it would not allow me to log in (black screen) or us apt commands.

descendant_command 02-10-2019 03:21 AM

That is not a supported upgrade - you need to go from 17.04 to 17.10 then 18.04.
Besides apt (which is the primary tool you need), it's likely there are many other critical components in inconsistent states that will need research and manual intervention to fix.

Everything is fixable, given enough time and knowledge - how much time do you want to devote to this?

I don't know you or what you already know, but based purely on your post count and my gut feeling, it's likely to be days/weeks and you will need to become intimately familiar with the inner workings of Ubuntu and it's packaging system.

If you just want a working system, get a live disk, save your data and do a fresh install.

pan64 02-10-2019 03:57 AM

but if you want to repair it first please post the content of /etc/apt/sources.list and /etc/apt/sources.list.d

HappyTux 02-11-2019 10:12 AM

Quote:

Originally Posted by Rookes123 (Post 5960060)
would there be a way to reinstall without losing personal data and can you tell me how?

You can do the live boot from cd/usb and copy the files you need or if you do new install and choose not to format the root partition if this is where the /home is located then it will install overtop what is present leaving the files intact that are already there and not on the install disk. Namely your home files and whatever is left over from the old install. Probably not the best way to get them back.


All times are GMT -5. The time now is 08:56 AM.