Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

unmet dependencies with update

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
jam7755
Posts: 19
Joined: 2019-08-01 02:35

unmet dependencies with update

#1 Post by jam7755 »

Hi, I am running Debian 11 and have been having trouble installing the latest updates When I run the update it runs fine. Then when I run the upgrade I get an error referring to unmet dependencies. Below is the output.


Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-5.10.0-28-amd64 (= 5.10.209-2) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

When I run 'apt --fix-broken install' I get

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
linux-headers-5.10.0-18-amd64 linux-headers-5.10.0-18-common linux-headers-5.10.0-19-amd64
linux-headers-5.10.0-19-common linux-headers-5.10.0-20-amd64 linux-headers-5.10.0-20-common
linux-headers-5.10.0-21-amd64 linux-headers-5.10.0-21-common linux-headers-5.10.0-22-amd64
linux-headers-5.10.0-22-common linux-headers-5.10.0-23-amd64 linux-headers-5.10.0-23-common
linux-headers-5.10.0-25-amd64 linux-headers-5.10.0-25-common linux-image-5.10.0-18-amd64
linux-image-5.10.0-19-amd64 linux-image-5.10.0-20-amd64 linux-image-5.10.0-21-amd64
linux-image-5.10.0-22-amd64 linux-image-5.10.0-23-amd64 linux-image-5.10.0-25-amd64
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
linux-image-5.10.0-28-amd64
Suggested packages:
linux-doc-5.10 debian-kernel-handbook
The following NEW packages will be installed:
linux-image-5.10.0-28-amd64
0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.
86 not fully installed or removed.
Need to get 0 B/55.7 MB of archives.
After this operation, 318 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 452411 files and directories currently installed.)
Preparing to unpack .../linux-image-5.10.0-28-amd64_5.10.209-2_amd64.deb ...
Unpacking linux-image-5.10.0-28-amd64 (5.10.209-2) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.10.0-28-amd64_5.10.209-2_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-5.10.0-28-amd64' to '/boot/vmlinuz-5.10.0-28-amd64.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-5.10.0-28-amd64_5.10.209-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am not sure of how to fix this. Any help would be appreciated.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1420
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 80 times
Been thanked: 191 times

Re: unmet dependencies with update

#2 Post by steve_v »

jam7755 wrote: 2024-04-04 03:06 dpkg: error processing archive /var/cache/apt/archives/linux-image-5.10.0-28-amd64_5.10.209-2_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-5.10.0-28-amd64' to '/boot/vmlinuz-5.10.0-28-amd64.dpkg-new': failed to write (No space left on device)
Free some space on your /boot filesystem.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

jam7755
Posts: 19
Joined: 2019-08-01 02:35

Re: unmet dependencies with update

#3 Post by jam7755 »

Thanks for the response. I am not a linux expert. What is the easiest way to do that?

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1422
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 47 times
Been thanked: 68 times

Re: unmet dependencies with update

#4 Post by None1975 »

To list all installed kernels, run (one command to show all kernels and headers that can be removed, excluding the current running kerne)l:

Code: Select all

kernelver=$(uname -r | sed -r 's/-[a-z]+//')
dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve $kernelver
It selects all packages named starting with

Code: Select all

linux-headers-<some number> or linux-image-<some number>
prints the package names for installed packages and then excludes the current loaded/running kernel. This fits in the recommendation of testing a newer kernel before removing older, known-to-work kernels.

So, after upgrading kernels and rebooting to test it, you can remove all other kernels with:

Code: Select all

sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

User avatar
PsychoHermit
Posts: 74
Joined: 2022-08-16 04:17
Location: Carson City, Nv
Has thanked: 6 times
Been thanked: 5 times

Re: unmet dependencies with update

#5 Post by PsychoHermit »

Apt listed several old kernels that could be removed with apt autoremove.

--glenn

User avatar
pbear
Posts: 386
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 2 times
Been thanked: 63 times

Re: unmet dependencies with update

#6 Post by pbear »

apt autoremove is what I was about to recommend also. @None1975 , is there a problem using that command here? Nothing is jumping out at me.

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1422
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 47 times
Been thanked: 68 times

Re: unmet dependencies with update

#7 Post by None1975 »

pbear wrote: 2024-04-06 04:37 apt autoremove is what I was about to recommend also. @None1975 , is there a problem using that command here? Nothing is jumping out at me.
Hello.
No problem with this command.

In my example this command remove ALL older kernels, excluding the current running kernel.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

User avatar
pbear
Posts: 386
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 2 times
Been thanked: 63 times

Re: unmet dependencies with update

#8 Post by pbear »

To be clear, @jam7755, autoremove will leave the current kernel undisturbed, retain the next-oldest kernel (a spare), and delete the rest. It's the simplest and fastest way to clear kernel clutter.

jam7755
Posts: 19
Joined: 2019-08-01 02:35

Re: unmet dependencies with update

#9 Post by jam7755 »

Thanks pbear,
I ran the autoremove command and got the following output again

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-5.10.0-28-amd64 (= 5.10.209-2) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

arid
Posts: 136
Joined: 2014-05-08 18:40
Location: Aridzona
Has thanked: 3 times
Been thanked: 1 time

Re: unmet dependencies with update

#10 Post by arid »

If you would use synaptic, these kind of problems would never occur :mrgreen:

You need to remove, not autoremove

Code: Select all

linux-image-amd64
It is a left-over from your original kernel. As long as you have it, apt will try to add the kernel.

You need 2 working kernels not a zillion. Get rid of all that junk and come up to experimental.

I'm using

Code: Select all

6.9.0-rc3
There's no drama in my sid......

jam7755
Posts: 19
Joined: 2019-08-01 02:35

Re: unmet dependencies with update

#11 Post by jam7755 »

I attempted to run the commands posted by none1975 and continue to get

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-5.10.0-28-amd64 (= 5.10.209-2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Does anyone else have any suggestions to help get past this error message?

CwF
Global Moderator
Global Moderator
Posts: 2741
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 45 times
Been thanked: 206 times

Re: unmet dependencies with update

#12 Post by CwF »

arid wrote: 2024-04-17 02:06 I'm using

Code: Select all

6.9.0-rc3
Remove meta package linux-image-amd64 if you are using an alternate kernel.

User avatar
sunrat
Administrator
Administrator
Posts: 6593
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 502 times

Re: unmet dependencies with update

#13 Post by sunrat »

CwF wrote: 2024-04-17 04:50 Remove meta package linux-image-amd64 if you are using an alternate kernel.
That's not essential. I run Liquorix kernel but keep the stable linux-image-amd64 so I always have the latest stable kernel as fallback. Liquorix is manually installed to avoid the Nvidia driver build failing for almost every point release upgrade.
Of course I could install linux-image-liquorix-amd64 from Liquorix to keep it upgraded to latest; same would apply for linux-image-amd64 if using Sid, Testing, or backports kernel.

Code: Select all

$ apt list -i linux-image*
Listing... Done
linux-image-6.1.0-18-amd64/stable,now 6.1.76-1 amd64 [installed,auto-removable]
linux-image-6.1.0-20-amd64/stable-security,now 6.1.85-1 amd64 [installed,automatic]
linux-image-6.6.6-1-liquorix-amd64/now 6.6-7.1~bookworm amd64 [installed,local]
linux-image-6.7.4-1-liquorix-amd64/now 6.7-8.1~bookworm amd64 [installed,local]
linux-image-amd64/stable-security,now 6.1.85-1 amd64 [installed]
Nothing OP has posted explains the issue except for: failed to write (No space left on device)
autoremove should have cleared enough space for a new kernel. Check disk space with df
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

jam7755
Posts: 19
Joined: 2019-08-01 02:35

Re: unmet dependencies with update

#14 Post by jam7755 »

Thanks to all for your input. I ended up finding a solution to this issue. The link to the site is posted below.

https://www.linuxuprising.com/2019/06/how-to-free-up-space-in-boot-partition.html

Post Reply