Upgrade Issue unmet dependencies
Hi,
Upgrade process failed due to broken package. Below is the error I am getting while trying to upgrade:
The following packages have unmet dependencies:
linux-generic-pae: Depends: linux-image-
linux-headers-
Alternatively, I tried running sudo apt-get install -f. but it didn't work, same error.
Please advice on the resolution here.
Thanks
Amit
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu apport Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Follow the instructions here:
https:/
Except at step 6 do not use the link given it will create a new question and we want the results here.
Use this one instead
https:/
We will be able to advise further one we have the results.
Revision history for this message
|
#2 |
Hello Warren,
I couldn't execute all the steps mentioned at the package manager troubleshooting link as I ran out of space on the partition drive during the backup step.
However, to provide you some of the information here, i am running ubuntu 12.04 LTS version. And during one of the updates, I ran into previous error:
linux-generic-pae: Depends: linux-image-
linux-headers-
Please let me know if there is an alternative way to resolve this issue or what specifically should I look for and will accordingly mention here.
Thanks
Amit
Revision history for this message
|
#3 |
Also, now facing a new error:
E:Could not open file /var/lib/
Revision history for this message
|
#4 |
The following commands should provide some basic information that is needed for helping further.
Please open a terminal and issue the following commands:
uname -a
lsb_release -a
dpkg -l linux | grep linux
df -h
df -i
ls -l /var/lib/dpkg
Then select all output, copy it and paste into this question document.
Revision history for this message
|
#5 |
Hello Manfred,
Below are the details, pleas let me know if anything additional. Also, would like to recover some space which was consumed during backup.
Thanks,
Amit
Linux AmitS 3.2.0-45-
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
dpkg-query: error: failed to open package info file `/var/lib/
Directory Info:
Filesystem Size Used Avail Use% Mounted on
/dev/sda9 5.7G 4.9G 517M 91% /
udev 487M 4.0K 487M 1% /dev
tmpfs 199M 828K 198M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 497M 160K 496M 1% /run/shm
/dev/sda7 16G 5.3G 9.4G 37% /home
/home/amit/.Private 16G 5.3G 9.4G 37% /home/amit
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda9 375360 375358 2 100% /
udev 124446 512 123934 1% /dev
tmpfs 126999 441 126558 1% /run
none 126999 3 126996 1% /run/lock
none 126999 8 126991 1% /run/shm
/dev/sda7 1024000 9301 1014699 1% /home
/home/amit/.Private 1024000 9301 1014699 1% /home/amit
total 6500
drwxr-xr-x 2 root root 4096 Jun 7 11:58 alternatives
-rw-r--r-- 1 root root 1538682 Jun 23 08:34 available
-rw-r--r-- 1 root root 1538682 Jun 23 08:30 available-old
-rw-r--r-- 1 root root 8 Aug 17 2012 cmethopt
-rw-r--r-- 1 root root 1160 Mar 22 18:26 diversions
-rw-r--r-- 1 root root 1206 Mar 22 18:22 diversions-old
drwxr-xr-x 2 root root 319488 Jun 23 08:30 info
-rw-r----- 1 root root 0 Jun 23 16:18 lock
drwxr-xr-x 2 root root 4096 Apr 12 2012 parts
-rw-r--r-- 1 root root 135 Aug 17 2012 statoverride
-rw-r--r-- 1 root root 1607921 Jun 23 08:34 status-bad
-rw-r--r-- 1 root root 1607921 Jun 23 08:30 status-old
drwxr-xr-x 2 root root 4096 Jun 7 11:58 triggers
drwxr-xr-x 2 root root 4096 Jun 23 08:34 updates
Revision history for this message
|
#6 |
ok, the issue with 'no space available' is rather clearly shown in the output above: you have run out of free inodes on /dev/sda9
There are two limits for files on an ext file system: space, and number of inodes (that is the number of files that can be stored). You have hit the "maximum number of files" limit, even if there still would be free space of 500MB.
I guess you have kernel header files for old kernels installed (thousands of small files), that can be deleted.
To get your package management system back to work open a terminal and issue the commands:
sudo mv /var/lib/
dpkg -l linux | grep linux
then copy/paste all output as done before.
Revision history for this message
|
#7 |
It created the status-bad file in dpkg folder. However, below command doesn't work. Please let me know what I need to do next.
amit@AmitS:~$ dpkg -l linux | grep linux
No packages found matching linux.
When I run
amit@AmitS:~$ dpkg -l | grep linux
It generates something like below. Please let me know what I need to do next.
Linux kernel image for version 3.2.0 on 32 bit x86 SMP
ii linux-image-
ii linux-image-
iU linux-image-
iU linux-image-
ii linux-libc-dev 3.2.0-45.70 Linux Kernel Headers for development
ii linux-sound-base 1.0.25+
ii pptp-linux 1.7.2-6 Point-to-Point Tunneling Protocol (PPTP) Client
ii syslinux 2:4.05+dfsg-2 collection of boot loaders
ii syslinux-common 2:4.05+dfsg-2 collection of boot loaders (common files)
ii syslinux-legacy 2:3.63+
ii util-linux 2.20.1-1ubuntu3 Miscellaneous system utilities
Revision history for this message
|
#8 |
By renaming status-bad back to status the package management system should be operable again (most probably still with the broken dependency from that was the starting point of this question).
The solution to your problem must be to delete files on your root file system (in your case that is all directories except the /home directory tree).
Execute the folowing commands:
sudo apt-get clean
sudo apt-get autoremove
sudo dpkg --configure -a
sudo apt-get install -f
df -h
df -i
and copy/paste the output as done before. Hopefully this will delete enough files that you have room to maneuver.
Revision history for this message
|
#9 |
Thanks, some of it worked great. I did manage to remove the status-old and available-old files, they were the copies of original. Here are the results:
amit@AmitS:~$ sudo apt-get clean
amit@AmitS:~$ sudo apt-get autoremove
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-generic-pae : Depends: linux-image-
linux-
E: Unmet dependencies. Try using -f.
amit@AmitS:~$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of linux-headers-
linux-
Package linux-headers-
dpkg: error processing linux-headers-
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-pae:
linux-generic-pae depends on linux-image-
Version of linux-image-
linux-generic-pae depends on linux-headers-
Package linux-headers-
dpkg: error processing linux-generic-pae (--configure):
dependency problems - leaving unconfigured
Setting up linux-image-
dpkg: unrecoverable fatal error, aborting:
unable to create `/var/lib/
Didn't go further, inodes are all utilized
amit@AmitS:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda9 375360 375360 0 100% /
udev 124446 512 123934 1% /dev
tmpfs 126999 440 126559 1% /run
none 126999 3 126996 1% /run/lock
none 126999 8 126991 1% /run/shm
/dev/sda7 1024000 9260 1014740 1% /home
/home/amit/.Private 1024000 9260 1014740 1% /home/amit
Revision history for this message
|
#10 |
Try uninstalling one of the older kernels:
dpkg --purge linux-image-
df -i
sudo dpkg --configure -a
You could also browse through /tmp and look if there are any files that look as if they are leftovers from the past, and in case you find some remove them (sudo rm...)
Revision history for this message
|
#11 |
Hello Manfred - my system has stalled to the extent that I won't allow me to login to the machine. And trying to run it in recovery mode or trying to clean the existing space isn't working either. I am trying to see if somehow I can boot the OS in terminal mode or shell mode, so as I can run above commands. Let me know if you have any thoughts.
Thanks,
Amit
Revision history for this message
|
#12 |
It seems that the fact that your disk is full (inode-wise) prevents the system from adequately booting.
try booting into "recovery mode - root shell prompt" - if that is possible, and issue the following commands:
mount -o rw,remount /
rm -rf /var/lib/
rm -rf /var/lib/apt/lists
rm /var/cache/
rm /var/cache/
mkdir /var/lib/apt/lists
mkdir /var/lib/
dpkg --purge linux-image-
df -i
If that fails, you have to use a DVD/USB to boot into a live system in "try Ubuntu" mode, mount your root file system to the live system, and execute the commands equivalent to the commands above, something like
sudo mkdir -p /media/disk
sudo mount -o rw,remount /dev/sda9 /media/disk
sudo rm -rf /media/
sudo rm -rf /media/
sudo rm /media/
sudo /media/
sudo mkdir /media/
sudo mkdir /media/
df -i
Can you help with this problem?
Provide an answer of your own, or ask amit k for more information if necessary.