SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-01-09 16:28:24

asportking
Member
Registered: 2013-10-24
Posts: 23

Errors when apt-get upgrade

I've been using Crunchbang on this computer for a while now, and since it was the distro I was using when I started to get into Linux, it's accumulated its fair share of tweaks. However, I've gotten a few error messages as a result of all this tinkering around. While I could just do a fresh install, I want to find out exactly what's causing these errors and fix them. The most prominent is, whenever I run an apt-get upgrade, I get these lines at the end:

Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.2.0-4-486_3.2.51-1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm not sure if the two errors are related, but regardless, could somebody help me out? Thanks a lot.

Offline

Help fund CrunchBang, donate to the project!

#2 2014-01-09 18:16:04

hhh
Caught in the Vortex
Registered: 2010-08-04
Posts: 2,346

Re: Errors when apt-get upgrade

Have you tried...

sudo apt-get -f install

Which kernel do you boot into (you'll see it in the GRUB menu when you boot up)?

Offline

#3 2014-01-09 19:26:57

asportking
Member
Registered: 2013-10-24
Posts: 23

Re: Errors when apt-get upgrade

hhh wrote:

Have you tried...

sudo apt-get -f install

Which kernel do you boot into (you'll see it in the GRUB menu when you boot up)?

No luck with the code. I'm not sure what to look for with the kernel though. Is it a version? I see something along the lines of "booting to linux 3.2. *some other numbers*" when I start my computer.

Offline

#4 2014-01-09 21:20:46

hhh
Caught in the Vortex
Registered: 2010-08-04
Posts: 2,346

Re: Errors when apt-get upgrade

Yes, a kernel version. When Grub comes up, press any key (down arrow, for instance) to pause the boot process. You can see what kernels are installed. Are there more than one, not including the "Recovery mode" entries? If so, you could boot into another one, remove the one giving an error message...

sudo apt-get purge linux-image-3.2.0-4-486

... and then try to reinstall it.

Usually the error you're seeing means a package wasn't properly installed and the solution is to remove it (apt-get purge or sudo dpkg -r) , but if you remove your only kernel you won't be able to boot up at all.

Also, when you're logged in again, in a terminal try...

sudo dpkg --configure --pending

sudo apt-get upgrade after this and/or after sudo apt-get -f install

You can also try reinstalling that kernel...

sudo apt-get update
sudo apt-get install --reinstall linux-image-3.2.0-4-486

Post any other error messages here.

Last edited by hhh (2014-01-09 21:26:39)

Offline

#5 2014-01-09 22:03:22

iann
#! Die Hard
Registered: 2010-09-10
Posts: 714

Re: Errors when apt-get upgrade

You might have something corrupt in your apt cache.  Try apt-get clean, then apt-get update, then see how it goes.

Offline

#6 2014-01-10 14:40:18

asportking
Member
Registered: 2013-10-24
Posts: 23

Re: Errors when apt-get upgrade

iann wrote:

You might have something corrupt in your apt cache.  Try apt-get clean, then apt-get update, then see how it goes.

Already tried, no luck.

hhh wrote:

Yes, a kernel version. When Grub comes up, press any key (down arrow, for instance) to pause the boot process. You can see what kernels are installed. Are there more than one, not including the "Recovery mode" entries? If so, you could boot into another one, remove the one giving an error message...

sudo apt-get purge linux-image-3.2.0-4-486

... and then try to reinstall it.

Usually the error you're seeing means a package wasn't properly installed and the solution is to remove it (apt-get purge or sudo dpkg -r) , but if you remove your only kernel you won't be able to boot up at all.

Also, when you're logged in again, in a terminal try...

sudo dpkg --configure --pending

sudo apt-get upgrade after this and/or after sudo apt-get -f install

You can also try reinstalling that kernel...

sudo apt-get update
sudo apt-get install --reinstall linux-image-3.2.0-4-486

Post any other error messages here.

Okay, the only two options are the linux-image-3.2.0-4.486 and the recovery mode. I've tried the --configure --pending, and it didn't work. Can I reinstall the kernel while running it?

Offline

#7 2014-01-10 15:47:32

hhh
Caught in the Vortex
Registered: 2010-08-04
Posts: 2,346

Re: Errors when apt-get upgrade

asportking wrote:

Can I reinstall the kernel while running it?

Yes. And, BTW, you're not seeing any errors other than the ones in your first post?

Also, post any errors you get after running each of these...

sudo apt-get autoremove
sudo apt-get autoclean
sudo dpkg --configure -a

Last edited by hhh (2014-01-10 15:51:44)

Offline

#8 2014-01-10 16:19:01

asportking
Member
Registered: 2013-10-24
Posts: 23

Re: Errors when apt-get upgrade

hhh wrote:
asportking wrote:

Can I reinstall the kernel while running it?

Yes. And, BTW, you're not seeing any errors other than the ones in your first post?

Also, post any errors you get after running each of these...

sudo apt-get autoremove
sudo apt-get autoclean
sudo dpkg --configure -a

No errors when I run any of them. However, I do get a plethora of errors when I try to reinstall the kernel. Here's the entire thing:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  linux-doc-3.2 debian-kernel-handbook
The following packages will be upgraded:
  linux-image-3.2.0-4-486
1 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Need to get 0 B/22.4 MB of archives.
After this operation, 45.1 kB disk space will be freed.
Preconfiguring packages ...
dpkg: warning: files list file for package 'linux-image-3.2.0-4-486' missing; assuming package has no files currently installed
(Reading database ... 104359 files and directories currently installed.)
Preparing to replace linux-image-3.2.0-4-486 3.2.41-2+deb7u2 (using .../linux-image-3.2.0-4-486_3.2.51-1_i386.deb) ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 3.2.0-4-486 /boot/vmlinuz-3.2.0-4-486
Unpacking replacement linux-image-3.2.0-4-486 ...
dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-4-486_3.2.51-1_i386.deb (--unpack):
 cannot copy extracted data for './lib/modules/3.2.0-4-486/kernel/drivers/gpu/drm/radeon/radeon.ko' to '/lib/modules/3.2.0-4-486/kernel/drivers/gpu/drm/radeon/radeon.ko.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-4-486 /boot/vmlinuz-3.2.0-4-486
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-4-486 /boot/vmlinuz-3.2.0-4-486
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.2.0-4-486_3.2.51-1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Offline

#9 2014-01-10 16:35:44

hhh
Caught in the Vortex
Registered: 2010-08-04
Posts: 2,346

Re: Errors when apt-get upgrade

I think this is the problem, your hard drive partition is full...

failed to write (No space left on device)

Offline

#10 2014-01-10 19:27:14

asportking
Member
Registered: 2013-10-24
Posts: 23

Re: Errors when apt-get upgrade

hhh wrote:

I think this is the problem, your hard drive partition is full...

failed to write (No space left on device)

Are you sure? I deleted over 10gb of stuff (not exclusively to fix this, don't worry, I've been meaning to clear some of this out), and it's still giving me the error.

Offline

#11 2014-01-10 19:30:18

hhh
Caught in the Vortex
Registered: 2010-08-04
Posts: 2,346

Re: Errors when apt-get upgrade

Of course I'm not sure, I have no idea how your disc is partitioned, what your "tweaks" are, etc...

Offline

#12 2014-01-10 19:54:37

asportking
Member
Registered: 2013-10-24
Posts: 23

Re: Errors when apt-get upgrade

hhh wrote:

Of course I'm not sure, I have no idea how your disc is partitioned, what your "tweaks" are, etc...

This help at all?

NAME                    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                       8:0    0 149.1G  0 disk 
├─sda1                    8:1    0   243M  0 part /boot
├─sda2                    8:2    0     1K  0 part 
└─sda5                    8:5    0 148.8G  0 part 
  ├─henry-root (dm-0)   254:0    0   332M  0 lvm  /
  ├─henry-usr (dm-1)    254:1    0   8.4G  0 lvm  /usr
  ├─henry-var (dm-2)    254:2    0   2.8G  0 lvm  /var
  ├─henry-swap_1 (dm-3) 254:3    0     2G  0 lvm  [SWAP]
  ├─henry-tmp (dm-4)    254:4    0   380M  0 lvm  /tmp
  └─henry-home (dm-5)   254:5    0   135G  0 lvm  /home

It's messy as hell though, I've been meaning to get around to making my partitions slightly less shitty.

Last edited by asportking (2014-01-10 19:56:38)

Offline

#13 2014-01-10 20:18:28

hhh
Caught in the Vortex
Registered: 2010-08-04
Posts: 2,346

Re: Errors when apt-get upgrade

Not really, That shows your partition scheme and disc space but not what space is available. The only thing that looks odd to me there is that swap isn't on a separate partition.

I don't think I can be of any help. When I've had that issue, it was either from a broken package, usually fixed by apt-get -f install or at least some useful error would come from that, or being out of disc space. Google's giving me nothing else either. Gparted would show you instantly if it's a space issue, but from what you've said I doubt that's it.

Maybe someone else will jump in here. Sorry.

Offline

#14 2014-01-10 21:29:56

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 4,441

Re: Errors when apt-get upgrade

asportking wrote:
hhh wrote:

I think this is the problem, your hard drive partition is full...

failed to write (No space left on device)

Are you sure? I deleted over 10gb of stuff (not exclusively to fix this, don't worry, I've been meaning to clear some of this out), and it's still giving me the error.

Did you shift-delete/rm the files or just delete from the file manager? Check your Trash, and check for any big error logs eg .xsession-errors


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Offline

#15 2014-01-10 23:52:02

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: Errors when apt-get upgrade

asportking wrote:
hhh wrote:

Of course I'm not sure, I have no idea how your disc is partitioned, what your "tweaks" are, etc...

This help at all?

NAME                    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                       8:0    0 149.1G  0 disk 
├─sda1                    8:1    0   243M  0 part /boot
├─sda2                    8:2    0     1K  0 part 
└─sda5                    8:5    0 148.8G  0 part 
  ├─henry-root (dm-0)   254:0    0   332M  0 lvm  /
  ├─henry-usr (dm-1)    254:1    0   8.4G  0 lvm  /usr
  ├─henry-var (dm-2)    254:2    0   2.8G  0 lvm  /var
  ├─henry-swap_1 (dm-3) 254:3    0     2G  0 lvm  [SWAP]
  ├─henry-tmp (dm-4)    254:4    0   380M  0 lvm  /tmp
  └─henry-home (dm-5)   254:5    0   135G  0 lvm  /home

It's messy as hell though, I've been meaning to get around to making my partitions slightly less shitty.

It`s not a good idea to split the hdd-space like you have done. Less is better. You have a very small root-partition, and a lack of space there could cause issues even if you have lots of free space in your system. 332 M for root isn`t enough even if you have a separate usr, tmp and var-partition. The sys-folder alone takes up 515.5 M in my root-partition, and that should tell you that your root-partition is way to small. Even with your current partition-scheme, root should be at least 2 GB, to be on the safe side.

As a side-note. Many of the oldtimers use a lot of separate partitions, and you will find such recommendations in online manuals and tutorials, but for a normal home-user, it doesn`t make sense to use all these separate partitions. Root, home and swap is more than enough. Personally I prefer one partition, and one partition only, as I backup my home-folder instead.


- apt-mark hold account

Offline

#16 2014-01-11 00:15:58

hhh
Caught in the Vortex
Registered: 2010-08-04
Posts: 2,346

Re: Errors when apt-get upgrade

^That's what I've done for all the time I've used Linux as well, put the OS on one partition, swap on another small one and let the OS divide up its space as it sees fit. And good catch on root, seems like /lib has no room left then...

cannot copy extracted data for './lib/modules/3.2.0-4-486/kernel/drivers/gpu/drm/radeon/radeon.ko' to '/lib/modules/3.2.0-4-486/kernel/drivers/gpu/drm/radeon/radeon.ko.dpkg-new'

Offline

#17 2014-01-25 00:09:24

KrunchTime
#! Die Hard
From: not where I belong
Registered: 2012-03-02
Posts: 2,385

Re: Errors when apt-get upgrade

ew wrote:

It`s not a good idea to split the hdd-space like you have done. Less is better. You have a very small root-partition, and a lack of space there could cause issues even if you have lots of free space in your system. 332 M for root isn`t enough even if you have a separate usr, tmp and var-partition. The sys-folder alone takes up 515.5 M in my root-partition, and that should tell you that your root-partition is way to small. Even with your current partition-scheme, root should be at least 2 GB, to be on the safe side.

As a side-note. Many of the oldtimers use a lot of separate partitions, and you will find such recommendations in online manuals and tutorials, but for a normal home-user, it doesn`t make sense to use all these separate partitions. Root, home and swap is more than enough. Personally I prefer one partition, and one partition only, as I backup my home-folder instead.

Good advice, ew!   wink

Offline

#18 2014-01-25 09:11:50

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,825
Website

Re: Errors when apt-get upgrade

I recommend installing 'ncdu' to have a visual feedback on which folder takes up what amount of space. Usually, as pointed out before, the trash folder and .xsession-errors can bloat up a system.


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo