Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Ubuntu 12.04 on an HP Mini 110 netbook. I have had it for 18 months and it works great. But last night Update Manager downloaded a large batch of files (about 75 MB) mostly having to do with a new Linux kernel. When I tried to install the updates, most were installed but two did not:

  1. Header files related to Linux kernel version 3.2.0 and
  2. Linux kernel headers for version 3.2.0 on 32 bit x86 SMP.

I tried to install these files again but each time it gives me a box saying the package system is broken and tells me to run the following command in a Terminal: apt-get install -f

When I open the Terminal and type the command, I get the following:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

In a separate notification, it tells me the error message was:

'Error: BrokenCount >0'.  This usually means that your installed packages have unmet dependencies.

Since this happened, I can not get a wireless connection to the internet. I don't know what to do. Is there a way to uninstall the files that were installed last night? My netbook has only a 16GB hard drive and I'm wondering if that has something to do with the error. Please help.


$ sudo apt-get install -f

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed: 
  linux-headers-3.2.0-57 linux-headers-3.2.0-57-generic-pae
The following NEW packages will be installed:
  linux-headers-3.2.0-57 linux-headers-3.2.0-57-generic-pae
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/12.7 MB of archives.
After this operation, 67.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y

(Reading database ... 895015 files and directories currently installed.)
Unpacking linux-headers-3.2.0-57 (from .../linux-headers-3.2.0-57_3.2.0-57.87_all.deb) ...
dpkg: error processing /var/cache/apt/archives/linux-headers-3.2.0-57_3.2.0-57.87_all.deb (--unpack):
 unable to create '/usr/src/linux-headers-3.2.0-57/sound/sh/Kconfig.dpkg-new' (while processing './usr/src/linux-headers-3.2.0-57/sound/sh/Kconfig'): No space left on device
No apport report written because the error message indicates a disk full error

dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Unpacking linux-headers-3.2.0-57-generic-pae (from .../linux-headers-3.2.0-57-generic-pae_3.2.0-57.87_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/linux-headers-3.2.0-57-generic-pae_3.2.0-57.87_i386.deb (--unpack):
 unable to create '/usr/src/linux-headers-3.2.0-57-generic-pae/include/config/v4l/mem2mem/drivers.h.dpkg-new' (while processing './usr/src/linux-headers-3.2.0-57-generic-pae/include/config/v4l/mem2mem/drivers.h'): 
No space left on device

No apport report written because the error message indicates a disk full error

dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-headers-3.2.0-57_3.2.0-57.87_all.deb
 /var/cache/apt/archives/linux-headers-3.2.0-57-generic-pae_3.2.0-57.87_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don't understand most of that, but it seems to indicate that my hard disk is full. I don't save many files to my hard disk. If it is full, it's because I get updates installed to my system every few days from Ubuntu. Do you have any suggestions what to do?

I started entering the group of commands. When I entered: sudo apt-get autoremove I got:

Reading package lists... Done 
Building dependency tree Reading state information... Done 
You might want to run 'apt-get -f install' to correct these. 
The following packages have unmet dependencies: 
linux-headers-generic-pae : Depends: linux-headers-3.2.0-57-generic-pae but it is not installable 
E: Unmet dependencies. Try using -f.

When I entered sudo apt-get update:

Err http://security.ubuntu.com precise-security Release.gpg Could not resolve 'security.ubuntu.com'
Err http://archive.canonical.com precise Release.gpg Could not resolve 'archive.canonical.com'
Err http://us.archive.ubuntu.com precise Release.gpg Could not resolve 'us.archive.ubuntu.com'
Err http://extras.ubuntu.com precise Release.gpg Could not resolve 'extras.ubuntu.com'
Err http://us.archive.ubuntu.com precise-updates Release.gpg Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com precise-backports Release.gpg Could not resolve 'us.archive.ubuntu.com'

Reading package lists... Done 
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release/gpg Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg Could not resolve 'us.archive.ubuntu.com' 
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release.gpg Could not resolve 'extras.ubuntu.com'
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/Release.gpg Could not resolve 'archive.canonical.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

When I entered sudo dpkg --configure -a, I got:

dpkg: dependency problems prevent configuration of linux-headers-generic-pae: linux-headers-generic-pae depends on linux-headers-3.2.0-57-generic-pae; however: Package linux-headers-3.2.0-57-generic-pae is not installed. 
dpkg: error processing linux-headers-generic-pae (--configure): dependency problems - leaving unconfigured 
dpkg: dependency problems prevent configuration of linux-generic-pae: linux-generic-pae depends on linux-headers-generic-pae (= 3.2.0.57.68); however: Package linux-headers-generic-pae is not configured yet. 
dpkg: error processing linux-generic-pae (--configure):
dependency problems - leaving unconfigured 
Errors were encountered while processing: linux-headers-generic-pae linux-generic-pae

When I entered: sudo apt-get install -f, I got:

Reading package lists... Done 
Building dependency tree Reading state information... Done 
Correcting dependencies... Done 
The following packages will be REMOVED: 
linux-generic-pae linux-headers-generic-pae 
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. 2 not fully installed or removed. 
After this operation, 65.5 kB disk space will be freed. 
Do you want to continue [Y/n]: Y 
(Reading database ... 895014 files and directories currently installed.) 
Removing linux-generic-pae... 
Removing linux-headers-generic-pae ...

The upshot of all this is I am no longer getting error messages, but my wireless connection is still not working. When I click on Edit Connections, the Network Connections box still lists my Verizon FIOS router ESSID and the Connect automatically box is still checked, but for some reason I am still not connecting. What should I do?

share|improve this question
    
I think you must re-install Ubuntu. –  Sushantp606 Dec 5 '13 at 17:33

2 Answers 2

apt-get install -f When I open the Terminal and type the command, I get the following: E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

as its saying that you are not root.you have to try the command as a root user.I mean the command should be as

sudo apt-get install -f

And for the issue of broken count >0 try this.

sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists/*
sudo mkdir /var/lib/apt/lists/partial
sudo rm /var/cache/apt/*.bin
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get update
sudo dpkg --configure -a
sudo apt-get install -f

For this error credit goes to Ubuntuforums

hope that helps.

share|improve this answer

I've had the same problem here. When I tried to update with the Update Manager, I was getting an error message. After reading this post with some commands, I tried some, but I tried something first, that was typing, on terminal, the command 'sudo apt-get update'. Then, I tried to execute again the Update Manager and it worked. My Ubuntu is a pt-br one, and the version was also the 12.04.

share|improve this answer
    
Question states that sudo apt-get update fails run too –  Sneetsher May 8 at 14:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.