View Full Version : [ubuntu] error every time i try to install new packages

December 29th, 2009, 07:45 PM
just installed ubuntu 9.10 on a compaq evo n610c laptop .. working out all the issues,


everytime i try to install a new package from the package manager i get the error

flash installer was the first try that this came up .. then tryed a few others and got the same error

E: linux-image-2.6.31-16-generic: subprocess installed post-installation script returned error exit status 1
E: linux-image-generic: dependency problems - leaving unconfigured
E: linux-generic: dependency problems - leaving unconfigured


cant get wireless to work , tried the ' hardware drivers' and it says im not running an proprietary drivers

i have a d-link airplus dwl-650 + wifi card

December 29th, 2009, 07:55 PM
I am having similar issues with apt-get dist-upgrade:

user@ubuntu:/var/cache/apt$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up linux-image-2.6.31-16-generic (2.6.31-16.53) ...
Internal Error: Could not find image (/boot/vmlinuz-2.6.31-16-generic)
dpkg: error processing linux-image-2.6.31-16-generic (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up nvidia-185-kernel-source (185.18.36-0ubuntu9) ...
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error processing nvidia-185-kernel-source (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any ideas?

December 29th, 2009, 07:59 PM
Are either of you utilizing a separate boot partition that may, for whatever reason, i.e., nearly full?
df -hat the command line to check status of HDD partitions mounted on Ubuntu boot as to size and free space.

December 29th, 2009, 08:03 PM
I am not. This is a fresh install, and everything is on one partition. Before I started getting this error I was trying to "activate" the NVIDIA drivers, but the laptop crashed during the install.

I have tried removing the files from cache, but that didnt make any difference either.


December 29th, 2009, 08:39 PM
same here this is a fresh install .. trying to install compiz and same thing happen

i used a 30g hard drive full install ..

December 29th, 2009, 08:46 PM
Thought compiz was installed by default.

Obviously, there was a problem with the kernel upgrade for both of you. Try, from the terminal,
sudo dpkg --configure -aand post back with any error messages.

December 29th, 2009, 08:55 PM
user@ubuntu:~$ sudo dpkg --configure -a
[sudo] password for user:

December 29th, 2009, 09:31 PM
jay@jay-laptop:~$ sudo dpkg --configure -a
Setting up linux-image-2.6.31-16-generic (2.6.31-16.53) ...
Running depmod.
Failed to run depmod
dpkg: error processing linux-image-2.6.31-16-generic (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-2.6.31-16-generic; however:
Package linux-image-2.6.31-16-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (=; however:
Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:

December 29th, 2009, 09:35 PM
Mine originally had similar issues until I cleared the cache folder andeleted the files /boot/

December 29th, 2009, 09:42 PM
how did you do that ? im lost here ..dont even know what that error meant

December 29th, 2009, 10:42 PM
This is how i removed the downloaded files from cache, however it didnt really fix anything

cd /var/cache/apt/archives/
sudo rm *

December 29th, 2009, 11:25 PM
OK. I think I may have figured this out. Bear with me, because I dont really know the "best" way to do things, but this seems to have fixed my issues.

First off I opened a terminal window and change my director to:

then i looked for the files that I was getting the errors about. In my case it was 'linux-headers-2.6.31-16 nvidia-settings linux-image-2.6.31-16-generic'. Doing an ls I looked for files with those names

ls | grep 2.6.31-16
ls | grp nvidia

I noticed that there were a few diff files for each problematic packagem, so I removed all of the files in question with the following:

sudo rm *2.6.31-16*
sudo rm nvidia-settings

When I ran apt-get dist-upgrade the errors were not there, but it also did not redownload the packges. I had to do the following command to removed the package files, you would have to replace these package names with the ones you are experiencing trouble with.

sudo apt-get remove --purge linux-headers-2.6.31-16 nvidia-settings linux-image-2.6.31-16-generic

and then this to install them

sudo apt-get -f install linux-headers-2.6.31-16 nvidia-settings linux-image-2.6.31-16-generic

So far everything seems to be ok. Let me know how it goes for you.


December 29th, 2009, 11:52 PM
i didnt get past the first step... it gives me an error trying to get into that diretory

December 30th, 2009, 12:04 AM
What error did you get?

What is your output from this:

cd /var/lib/dpkg/

December 31st, 2009, 11:33 AM

tnx alot, your advice cured the same bugs I encountered.
I wish u all a pleasant 2010.

May 7th, 2010, 10:26 PM

Thanks for your posts. They helped me solve a similar problem with 2.16.31-14 kernel errors.