Fixing Debian Apt (Want to add Backports, currently broken)?

New to Debian (Or Linux in general)? Ask your questions here!

Fixing Debian Apt (Want to add Backports, currently broken)?

Postby StevenC21 » 2018-11-12 06:21

Sorry for the title, I couldn't fit it in well...

Note: Its an i686 PC

Basically, I was (as an Arch User) trying to assist my friend (who is 100% new to Linux) with adding the testing and unstable repos to his Debian 9.5 system. However, things have gone very awry. Specifically, this error is occuring:

Code: Select all
sha-pc@debian:~$ sudo apt --fix-broken install lmms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 lmms : Depends: lmms-common (>= 1.1.3-7) but it is not going to be installed
        Depends: calf-ladspa but it is not going to be installed
        Depends: libfltk1.3 (>= 1.3.1) but it is not going to be installed
        Depends: libfluidsynth1 (>= 1.1.6-4~) but it is not going to be installed
        Depends: libportaudio2 (>= 19+svn20101113) but it is not going to be installed
        Depends: libqt4-xml (>= 4:4.5.3) but it is not going to be installed
        Depends: libqtcore4 (>= 4:4.8.0) but it is not going to be installed
        Depends: libqtgui4 (>= 4:4.5.3) but it is not going to be installed
        Depends: libstk-4.5.0 but it is not going to be installed
        Depends: stk but it is not going to be installed
        Recommends: tap-plugins but it is not going to be installed
        Recommends: caps but it is not going to be installed
        Recommends: lmms-vst-server:i386 (>= 1.1.3-7)
 python3-apt : Depends: libapt-pkg5.0 (>= 1.7.0~alpha3~) but 1.4.8 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


I then had him run this:
Code: Select all
sha-pc@debian:~$ sudo apt -t testing install libapt-pkg5.0


(Which succeeded without errors as far as he told me)

I was trying to upgrade libapt since that appeared to be the error, and since --fix-broken didn't help. However, this broke it further. Now, all usage of apt results in:
Code: Select all
sha-pc@debian:~$ sudo apt install lmms
apt-get: relocation error: /usr/lib/i386-linux-gnu/libapt-private.so.0.0: symbol _ZN3URIcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEB5cxx11Ev version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference


I know that to fix this error normally, we just wget the .deb file for 1.4.8 and use dpkg to install it, but then I have an incompatible version. I suspect that somehow down the line, I instructed him to do something damaging, but since I am unfamiliar with apt, and I frankly don't have the time to learn its intricacies, I was hoping that a more experienced user would have time to possibly instruct me on how to either fix his system, since it is clearly broken, and then get backports running, OR, fix the system so that he can use unstable and testing without issue.

Either one should be fine.

Possibly useful files:

Code: Select all
/etc/apt/sources.list:

# Testing repository - main, contrib and non-free branches
deb http://http.us.debian.org/debian testing main non-free contrib
deb-src http://http.us.debian.org/debian testing main non-free contrib


# Testing security updates repository
deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free


# Unstable repo main, contrib and non-free branches, no security updates here
deb http://http.us.debian.org/debian unstable main non-free contrib
deb-src http://http.us.debian.org/debian unstable main non-free contrib

deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free

deb http://deb.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://deb.debian.org/debian-security/ stretch/updates main contrib non-free

deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free


Code: Select all
/etc/apt/preferences

Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 650

Package: *
Pin: release a=unstable
Pin-Priority: 600


I don't know if there are other helpful files, but to my knowledge those are the only ones that we made modifications to. Thank you to anyone who takes the time to read this.

Side note: If somebody knows how to get a 100% reset on apt, with all config files and EVERYTHING, that would be appreciated as well. Not reset the repos, or anything, but actually reset apt to its out-of-the-box state.
StevenC21
 
Posts: 2
Joined: 2018-11-12 06:02

Re: Fixing Debian Apt (Want to add Backports, currently brok

Postby dilberts_left_nut » 2018-11-12 06:51

StevenC21 wrote:I suspect that somehow down the line, I instructed him to do something damaging
Yes, this:
StevenC21 wrote:adding the testing and unstable repos to his Debian 9.5 system.
Don't do that.

StevenC21 wrote:Now, all usage of apt results in:
See this thread and linked bug report.
viewtopic.php?f=30&t=139052

StevenC21 wrote:Side note: If somebody knows how to get a 100% reset on apt, with all config files and EVERYTHING, that would be appreciated as well. Not reset the repos, or anything, but actually reset apt to its out-of-the-box state.
Yes, roll back your filesystem snapshot or restore or recent backup (these require having made them in advance).

Probably your least painful course of action is to reinstall stable and then not break it.

See backports instruction here:
https://backports.debian.org/
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 4913
Joined: 2009-10-05 07:54
Location: enzed

Re: Fixing Debian Apt (Want to add Backports, currently brok

Postby StevenC21 » 2018-11-12 07:08

I understand. I will most likely just reinstall then, the system has been up for less than a day haha, so no backups as of yet. Thank you for your advice!
StevenC21
 
Posts: 2
Joined: 2018-11-12 06:02

Re: Fixing Debian Apt (Want to add Backports, currently brok

Postby kevinthefixer » 2018-11-25 00:44

Steven, you said your friend is a noob, why are you steering him toward Debian? Yes, it's easier to deal with than Arch, but only a step or two. Do him (or her) a favor, steer towards Linux Mint or Ubuntu where everything "just works". Adding unstable and testing repos to a beginner's Debian installation is just a nasty trick, sure to send them right back to that insidious other OS!
kevinthefixer
 
Posts: 107
Joined: 2018-05-05 22:30

Re: Fixing Debian Apt (Want to add Backports, currently brok

Postby GarryRicketson » 2018-11-25 00:49

Better yet MX https://mxlinux.org/
I would not suggest or recommend either LinuxMint or Ubuntu to my worst enemy
User avatar
GarryRicketson
 
Posts: 5193
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Fixing Debian Apt (Want to add Backports, currently brok

Postby piper » 2018-11-25 01:10

GarryRicketson wrote:I would not suggest or recommend either LinuxMint or Ubuntu to my worst enemy


+1000
User avatar
piper
 
Posts: 89
Joined: 2005-07-03 08:29

Re: Fixing Debian Apt (Want to add Backports, currently brok

Postby kevinthefixer » 2018-11-25 14:27

MX is good. I don't care for Ubuntu myself, but it is a reliable system for those who don't want to tinker with their system. LM added some nice bells & whistles, my non-techie better half has been using it for years with no problems. LMDE2 served me well for many years, worked so well inertia kept me from upgrading to Stretch until a lightning bolt took out the mobo on my workhorse desktop. Point is, these days there's a Linux distro for just about anyone, but Debian is not aimed at beginners, rather at intermediate "power" users like myself.
kevinthefixer
 
Posts: 107
Joined: 2018-05-05 22:30


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable