LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > antiX / MX Linux
User Name
Password
antiX / MX Linux This forum is for the discussion of antiX and MX Linux.

Notices


Reply
  Search this Thread
Old 04-03-2020, 04:52 AM   #1
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
My friend has screwed up apt and I need advice on troubleshooting it


Trying to fix somebody else's problem long-distance when you are both in isolation is not easy. It becomes even more difficult when the person at the coalface doesn't fully understand what is going on. She has been using AntiX for two years now and does her own weekly updates using synaptic, but now she has a snafu.

She wasn't able to explain to me exactly how she got into this mess, but it must have been an interrupted update. The first thing we tried was a command line update using apt upgrade. It failed and instructed her to run dpkg --configure -a by hand, so she tried to do that, but it stalled. So I thought we'd try to get a list of what was pending and update packages individually until we find out which package is broken. I hoped to be able to use synaptic for that but it won't run.

So I asked her to run dpkg --yet-to-unpack, hoping that would give us our list. It ran successfully but gave us nothing! I don't know much about the internals of apt, despite having been a Debian user for years, but I gather that unpacking goes to completion before any configuration is done. The break has obviously happened during this configuration stage.

How do we find out what these packages are? Or alternatively, is there an emergency command that will clear the blockage.

Last edited by hazel; 04-03-2020 at 06:53 AM.
 
Old 04-03-2020, 05:34 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,490

Rep: Reputation: Disabled
Maybe

Code:
apt-get -install --fix-broken
https://unix.stackexchange.com/quest...all-fix-broken
 
Old 04-04-2020, 07:58 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573

Original Poster
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
OK, she has now tried that. Unfortunately apt-get simply refuses to run. It just refers her back to a manual run of dpkg --configure -a. Which then freezes as before.

I'm sure we could crack this if we could use a more specific option than "-a". There must be one particular package in the pipeline that is breaking dpkg. If we could only find out what it is, it could be uninstalled and the rest of the update carried out properly.

I'm not sure but I think this is the update that had all the wifi firmware in it.

Where do downloaded packages go? And, more important, where do they get unpacked? Is there any kind of directory listing that would tell us what's in the pipeline?

Last edited by hazel; 04-04-2020 at 08:01 AM.
 
Old 04-04-2020, 08:20 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
There must be one particular package in the pipeline that is breaking dpkg.
Maybe just start aptitude and see what packages are marked as broken? Or even
Code:
dpkg -l | grep '^.[^ic]'
 
1 members found this post helpful.
Old 04-04-2020, 08:41 AM   #5
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,490

Rep: Reputation: Disabled
Not sure if this will help, (the dpkg man page).

https://linux.die.net/man/1/dpkg
 
Old 04-04-2020, 08:51 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573

Original Poster
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by shruggy View Post
Maybe just start aptitude and see what packages are marked as broken?
I've never used aptitude myself. I think I'd have to play about with it a bit before I tried to do a long-distance aptitude session with another naive user.
Quote:
Or even
Code:
dpkg -l | grep '^.[^ic]'
Could you please elaborate on that? What would the absence of a terminal "i" or "c" denote? Or am I misunderstanding your regular expression?
 
Old 04-04-2020, 08:56 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Quote:
Originally Posted by hazel View Post
I've never used aptitude myself. I think I'd have to play about with it a bit before I tried to do a long-distance aptitude session with another naive user.


Could you please elaborate on that? What would the absence of a terminal "i" or "c" denote? Or am I misunderstanding your regular expression?
when you execute dpkg -l it will display an explanation at the beginning. Unfortunately it is lost because of the grep. So try: dpkg -l | less

you may also try: apt clean, sometimes helps.
 
Old 04-04-2020, 09:09 AM   #8
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573

Original Poster
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by fatmac View Post
Not sure if this will help, (the dpkg man page).

https://linux.die.net/man/1/dpkg
Thanks. Having read that man page again, I feel even more frustrated because I now know where the information I want might be hiding.
Quote:
Originally Posted by man dpkg
/var/lib/dpkg/status
Statuses of available packages. This file contains information about whether a package is marked for removing or not, whether it is installed or not, etc.
Unfortunately it doesn't state whether only pending updates are listed there or everything on the system (which would make it pretty well useless for information).

I think I'll have to spend the next day or so exploring the options on my own AntiX system before going back to my friend.
 
Old 04-04-2020, 09:14 AM   #9
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
Could you please elaborate on that? What would the absence of a terminal "i" or "c" denote?
Any package status other than Installed or Config-files. See dpkg-query(1)
 
Old 04-04-2020, 09:47 AM   #10
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573

Original Poster
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Using aptitude is (probably) out. I've got AntiX running in front of me now and aptitude is not part of the default install so my friend won't have it either. I wouldn't want her to try installing it while the whole apt system is in such a mess.

On the other hand the dpkg -l|grep pipeline suggested by shruggy seems to work very well. So that is the next thing we shall try.

I also had a look at the /var/lib/dpkg/status directory. Unfortunately it contains all installed packages so it's huge. But piping just the Status lines through more might yield something useful.

I shall arrange another long-range session and report back. Thanks for all your help so far.

Last edited by hazel; 04-04-2020 at 09:49 AM.
 
Old 04-04-2020, 10:15 AM   #11
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
If there's some breakage in /var/lib/dpkg/status then dpkg -C will probably catch it.

sudo dpkg -V also may reveal some clues, but it's 1) rather time-consuming, and 2) may generate too much noise.
 
1 members found this post helpful.
Old 04-05-2020, 04:39 AM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
It seems that ssh is installed on AntiX by default.
Wouldn't that be the best option, make your friend start sshd and you can ssh into the machine and fix it?
 
Old 04-05-2020, 05:31 AM   #13
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573

Original Poster
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by ondoho View Post
It seems that ssh is installed on AntiX by default.
Wouldn't that be the best option, make your friend start sshd and you can ssh into the machine and fix it?
It's probably too late for me to learn how to do that now. How does one ssh into someone else's desktop machine? What would I use as an address? And how would we exchange public keys? I'm probably as naive on such matters as she is.

It's definitely an idea for the future though. If I had a permanent account on that machine and a way of logging in, problems like this would be much easier to solve. I do have access to the root account actually but I bet sshd is configured by default not to allow remote root logins. It certainly would be on any machine of mine!

Last edited by hazel; 04-05-2020 at 05:34 AM.
 
Old 04-05-2020, 06:06 AM   #14
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,490

Rep: Reputation: Disabled
Once in, you change to root using su.

It's not something I have any real experience of though, I just had a go at it a couple of times when I was in the inquisitive stage of using Linux/BSD.
 
Old 04-05-2020, 09:03 AM   #15
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,972
Blog Entries: 32

Rep: Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465
hazel,

This may help:
https://mediatemple.net/community/pr...-the-root-user
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Friend's generic PC has failed: has anyone an idea? RandomTroll Linux - Hardware 5 09-21-2014 05:52 PM
My friend pc has a problem as it is not connecting with internet. krbdasan General 6 01-18-2011 04:47 PM
[SOLVED] Missing "added friend" in friend's list raju.mopidevi LQ Suggestions & Feedback 3 12-18-2009 06:56 AM
Windows Vista resolve.conf file (friend has a virus) 1veedo General 5 01-12-2009 06:50 PM
My friend has a problem. Draconian Linux - General 11 09-04-2004 04:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > antiX / MX Linux

All times are GMT -5. The time now is 07:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration