LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-06-2008, 10:08 AM   #1
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
Where are debian package names stored?


While trying to download a patch, I got my Ubuntu system in a state where the package lists think a module is installed that isn't there. sudo apt-get install -f fails; and Synaptic package manager lists this package, but attempts to remove fail, because the package is not present.

1) How can I resynch my system?

2) Can this be done by editing the Debian package list, and, if so, where is that? I've been searching for a while.

Here is one set of errors:

sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-ubuntu-modules-2.6.22-10-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 8405kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 96753 files and directories currently installed.)
Removing linux-ubuntu-modules-2.6.22-10-generic ...
FATAL: Could not open '/boot/System.map-2.6.22-10-generic': No such file or directory
update-initramfs: Generating /boot/initrd.img-2.6.22-10-generic
Cannot find /lib/modules/2.6.22-10-generic
update-initramfs: failed for /boot/initrd.img-2.6.22-10-generic
dpkg: error processing linux-ubuntu-modules-2.6.22-10-generic (--remove):
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
linux-ubuntu-modules-2.6.22-10-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Many thanks.
 
Old 03-06-2008, 10:20 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You can try sudo aptitude reinstall linux-ubuntu-modules-2.6.22-10-generic
 
Old 03-06-2008, 10:54 AM   #3
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Original Poster
Rep: Reputation: 35
This fails too, because a removal is scheduled...

Quote:
Originally Posted by pljvaldez View Post
You can try sudo aptitude reinstall linux-ubuntu-modules-2.6.22-10-generic
Here is the log:
sudo aptitude reinstall linux-ubuntu-modules-2.6.22-10-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages are BROKEN:
linux-ubuntu-modules-2.6.22-10-generic
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
The following packages have unmet dependencies:
linux-ubuntu-modules-2.6.22-10-generic: Depends: linux-image-2.6.22-10-generic which is a virtual package.
Resolving dependencies...
E: I wasn't able to locate file for the linux-ubuntu-modules-2.6.22-10-generic package. This might mean you need to manually fix this package.
The following actions will resolve these dependencies:

Remove the following packages:
linux-ubuntu-modules-2.6.22-10-generic

Score is 119

Accept this solution? [Y/n/q/?] y
The following packages will be automatically REMOVED:
linux-ubuntu-modules-2.6.22-10-generic
The following packages will be REMOVED:
linux-ubuntu-modules-2.6.22-10-generic
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 8405kB will be freed.
Do you want to continue? [Y/n/?] y
Writing extended state information... Done
(Reading database ... 96753 files and directories currently installed.)
Removing linux-ubuntu-modules-2.6.22-10-generic ...
FATAL: Could not open '/boot/System.map-2.6.22-10-generic': No such file or directory
update-initramfs: Generating /boot/initrd.img-2.6.22-10-generic
Cannot find /lib/modules/2.6.22-10-generic
update-initramfs: failed for /boot/initrd.img-2.6.22-10-generic
dpkg: error processing linux-ubuntu-modules-2.6.22-10-generic (--remove):
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
linux-ubuntu-modules-2.6.22-10-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
 
Old 03-06-2008, 11:17 AM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Maybe it will allow you to purge it..
aptitude purge <packagename>

Have you manually looked to see if any of those files exist ?
 
Old 03-06-2008, 11:28 AM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
It has been long time since I ran Debian ... you have to use lower-level utility dpkg to fix this, can't recall the options, -f for force?
 
Old 03-06-2008, 11:44 AM   #6
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Original Poster
Rep: Reputation: 35
dpkg -P -a

sudo dpkg -P -a

-a takes the place of package name and basically says the package I'm trying to removed will be purge from /var/lib/dpkg/status but that does not work, as you can see from running the command:

(Reading database ... 96753 files and directories currently installed.)
Removing linux-ubuntu-modules-2.6.22-10-generic ...
FATAL: Could not open '/boot/System.map-2.6.22-10-generic': No such file or directory
update-initramfs: Generating /boot/initrd.img-2.6.22-10-generic
Cannot find /lib/modules/2.6.22-10-generic
update-initramfs: failed for /boot/initrd.img-2.6.22-10-generic
dpkg: error processing linux-ubuntu-modules-2.6.22-10-generic (--purge):
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
linux-ubuntu-modules-2.6.22-10-generic

Edit:
-----

dpkg -P -a is supposed to have purged linux-ubuntu-modules-2.6.22-10-generic from /var/lib/dpkg/status, but that did not happen. I purged the file manually.

Last edited by cmnorton; 03-06-2008 at 11:54 AM. Reason: Possible Solution Found:
 
Old 03-06-2008, 11:54 AM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
I seem to remember dpkg had --force-all option, type dpkg --force-help for help?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Debian Package. rvijay Debian 61 04-04-2006 09:23 PM
what is the debian package ztdep Linux - Software 3 01-05-2006 07:24 PM
Same package names :-( jechen Linux - Software 4 09-30-2005 06:41 PM
debian package mithereal Debian 7 09-12-2005 03:17 AM
SAMBA: display of share names is OK but files names are wrong superandrzej Linux - Software 5 02-02-2004 09:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration