Aptitude tries to resolve dependecies forever...

Kernels & Hardware, configuring network, installing services

Aptitude tries to resolve dependecies forever...

Postby jeffry7 » 2019-08-01 02:23

Hi Folks,

I think I have screwed up the package manager on my Debian box. Right now what it is doing is Resolving dependencies. It has been doing this for 100+ minutes. The process has used up around 93% of 8 Gig of RAM and is eating into the swap space. (Already at 6 Gig there.)

I am not sure what I did to get in this state. I know a while back I added the unstable repos to the sources list. I was interested in one package that had a fix in the newer version. I limited the updates in some way so that pretty much everything else would pull from stable, but at this point I don't remember how I did that. Today when I got into aptitude to check for security updates, I got dependency problems. I stopped that job. Removed unstable from the sources files, did an apt-get update and then restarted aptitude. Now it is a runaway process. I figured before I wrecked the system further, I would ask for help.

How do I even start to figure this out? I came up empty on search. What do I even search for?
jeffry7
 
Posts: 20
Joined: 2017-12-03 16:41

Re: Aptitude tries to resolve dependecies forever...

Postby ruwolf » 2019-08-01 03:54

And what about this duo of commands?
Code: Select all
sudo apt-get autoremove
sudo apt-get install -f
User avatar
ruwolf
 
Posts: 392
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: Aptitude tries to resolve dependecies forever...

Postby sunrat » 2019-08-01 11:10

First, save all your personal files and data to another device like an external hard drive. Then try the options mentioned above and when that fails, reinstall Debian stable. Adding non-standard repositories is always risky and sometimes it works, other times it creates disaster.
It's always a good idea to keep a complete system backup so you can recover from disaster in a few minutes, and make a new one regularly and before doing anything potentially damaging like adding repositories. I use and recommend Clonezilla although there are a few options.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2920
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Aptitude tries to resolve dependecies forever...

Postby L_V » 2019-08-01 11:32

Wait a minute.
Before removing/reinstalling everything, would it be possible to first have a look at this ?
Code: Select all
grep -rh ^d /etc/apt/sources*

aptitude versions '~i' --group-by source-package | grep ^i | grep -v 995 | wc -l

apt-cache policy | grep http
L_V
 
Posts: 1170
Joined: 2007-03-19 09:04

Re: Aptitude tries to resolve dependecies forever...

Postby Head_on_a_Stick » 2019-08-01 17:27

I would check
Code: Select all
apt-show-versions | grep '/sid'

https://packages.debian.org/buster/apt-show-versions

Or just use
Code: Select all
# apt purge $(apt-show-versions | grep '/sid')

But reinstalling (or restoring) is probably the best approach.
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10680
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Aptitude tries to resolve dependecies forever...

Postby 4D696B65 » 2019-08-01 17:35

I remember years ago when aptitude was recommended, it would still choke badly on large upgrades. My solution back then was to stop aptitude and use apt-get.
User avatar
4D696B65
 
Posts: 2439
Joined: 2009-06-28 06:09

Re: Aptitude tries to resolve dependecies forever...

Postby sunrat » 2019-08-01 23:26

There shouldn't be any large upgrades in stable, unless OP is running with "stable" in sources rather than "stretch" and this is the first upgrade since Buster release. The contents of sources would be great to remove ambiguity.

As L_V posted:
Code: Select all
apt-get policy |grep http
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2920
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Aptitude tries to resolve dependecies forever...

Postby jeffry7 » 2019-08-02 01:38

L_V wrote:Wait a minute.
Before removing/reinstalling everything, would it be possible to first have a look at this ?
Code: Select all
grep -rh ^d /etc/apt/sources*

aptitude versions '~i' --group-by source-package | grep ^i | grep -v 995 | wc -l

apt-cache policy | grep http


Code: Select all
root@blackhole:/home/csg2/VueScan/VueScan# grep -rh ^d /etc/apt/sources*
deb http://ftp.us.debian.org/debian/ stretch main
deb-src http://ftp.us.debian.org/debian/ stretch main
deb http://security.debian.org/ stretch/updates main
deb-src http://security.debian.org/ stretch/updates main
deb http://ftp.us.debian.org/debian/ stretch-updates main
deb-src http://ftp.us.debian.org/debian/ stretch-updates main
deb http://ftp.us.debian.org/debian/ jessie main
deb-src http://ftp.us.debian.org/debian/ jessie main
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
deb http://ftp.us.debian.org/debian/ jessie-updates main
deb-src http://ftp.us.debian.org/debian/ jessie-updates main


Code: Select all
root@blackhole:/home/csg2/VueScan/VueScan# aptitude versions '~i' --group-by source-package | grep ^i | grep -v 995 | wc -l
2193


Code: Select all
root@blackhole:/home/csg2/VueScan/VueScan# apt-cache policy | grep http
 500 http://ftp.us.debian.org/debian stretch-updates/main i386 Packages
 500 http://ftp.us.debian.org/debian stretch-updates/main amd64 Packages
 500 http://security.debian.org stretch/updates/main i386 Packages
 500 http://security.debian.org stretch/updates/main amd64 Packages
 500 http://ftp.us.debian.org/debian stretch/main i386 Packages
 500 http://ftp.us.debian.org/debian stretch/main amd64 Packages
jeffry7
 
Posts: 20
Joined: 2017-12-03 16:41

Re: Aptitude tries to resolve dependecies forever...

Postby jeffry7 » 2019-08-02 01:40

Head_on_a_Stick wrote:I would check
Code: Select all
apt-show-versions | grep '/sid'

https://packages.debian.org/buster/apt-show-versions

Or just use
Code: Select all
# apt purge $(apt-show-versions | grep '/sid')

But reinstalling (or restoring) is probably the best approach.


Code: Select all
root@blackhole:/home/csg2/VueScan/VueScan# apt-show-versions | grep '/sid'
bash: apt-show-versions: command not found
jeffry7
 
Posts: 20
Joined: 2017-12-03 16:41

Re: Aptitude tries to resolve dependecies forever...

Postby jeffry7 » 2019-08-02 01:42

sunrat wrote:There shouldn't be any large upgrades in stable, unless OP is running with "stable" in sources rather than "stretch" and this is the first upgrade since Buster release. The contents of sources would be great to remove ambiguity.

As L_V posted:
Code: Select all
apt-get policy |grep http


Code: Select all
root@blackhole:/home/csg2/VueScan/VueScan# apt-get policy |grep http
E: Invalid operation policy
jeffry7
 
Posts: 20
Joined: 2017-12-03 16:41

Re: Aptitude tries to resolve dependecies forever...

Postby jeffry7 » 2019-08-02 01:54

ruwolf wrote:And what about this duo of commands?
Code: Select all
sudo apt-get autoremove
sudo apt-get install -f


Is there a risk that this will make things worse?
jeffry7
 
Posts: 20
Joined: 2017-12-03 16:41

Re: Aptitude tries to resolve dependecies forever...

Postby jeffry7 » 2019-08-02 01:59

Is this useful?

Code: Select all
root@blackhole:/home/csg2/VueScan/VueScan# apt-get -s install motion
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 motion : Depends: libmariadbclient18 (>= 5.5.36) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
jeffry7
 
Posts: 20
Joined: 2017-12-03 16:41

Re: Aptitude tries to resolve dependecies forever...

Postby sunrat » 2019-08-02 02:02

jeffry7 wrote:
Code: Select all
root@blackhole:/home/csg2/VueScan/VueScan# apt-get policy |grep http
E: Invalid operation policy

Oops, my bad. It should be apt-cache policy but you already posted that. I'm too used to using the newer version of the command which is simply apt policy.

I'm really curious why the command "grep -rh ^d /etc/apt/sources*" shows Jessie sources (which is not a good thing) whereas 'apt-cache policy' does not. :?:
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2920
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Aptitude tries to resolve dependecies forever...

Postby sunrat » 2019-08-02 02:08

jeffry7 wrote:Is this useful?

Code: Select all
...
The following packages have unmet dependencies:
 motion : Depends: libmariadbclient18 (>= 5.5.36) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


When you have unmet dependencies like this, it helps to check the Debian repo to see why that version is not installable. In this case it doesn't appear to exist in current repos so may be a Jessie version. Jessie repos have moved to archive iirc.
https://packages.debian.org/search?keyw ... dbclient18

You can also use aptitude why-not, in this case
Code: Select all
aptitude why-not motion


Has this system been upgraded from Jessie?

For your previous question apt autoremove can be dangerous but usually not. apt-get install -f should be safe, it will just exit and do nothing if it can't find anything missing.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2920
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Aptitude tries to resolve dependecies forever...

Postby jeffry7 » 2019-08-02 14:04

sunrat wrote:
jeffry7 wrote:Is this useful?

Code: Select all
...
The following packages have unmet dependencies:
 motion : Depends: libmariadbclient18 (>= 5.5.36) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


When you have unmet dependencies like this, it helps to check the Debian repo to see why that version is not installable. In this case it doesn't appear to exist in current repos so may be a Jessie version. Jessie repos have moved to archive iirc.
https://packages.debian.org/search?keyw ... dbclient18

You can also use aptitude why-not, in this case
Code: Select all
aptitude why-not motion


Has this system been upgraded from Jessie?

For your previous question apt autoremove can be dangerous but usually not. apt-get install -f should be safe, it will just exit and do nothing if it can't find anything missing.


It has been upgraded from Jessie.

I have to wait until tonight to try any further commands.
jeffry7
 
Posts: 20
Joined: 2017-12-03 16:41

Next

Return to System configuration

Who is online

Users browsing this forum: No registered users and 15 guests

fashionable