[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: corrupt/lost dpkg files, dpkg broken, aptitude broken, help :(



On 6/8/2013 4:43 AM, Brian wrote:
> On Fri 07 Jun 2013 at 18:54:11 -0500, Stan Hoeppner wrote:
> 
>> On 6/7/2013 5:26 PM, Brian wrote:
>>>
>>> A missing available file can be rebuilt with
>>>
>>>    apt-get/aptitude/dselect update
>>>
>>> Doing
>>>
>>>    touch /var/lib/dpkg/available
>>>
>>> beforehand might not come amiss.
>>
>> Tried this but it didn't rebuild the file.  However, simply having the
>> empty available file after touch prevents the aptitude errors when
>> removing a package.  Aptitude also auto-creates available-old, which is
>> also empty of course.
> 
> I use dselect, which does update the available file and which keeps the
> apt and dpkg data in sync. However, you are now over the worst of it.
> Installing something would get /var/lib/dpkg/available populated.
> 
>>> There should also be a /var/lib/dpkg/available-old file which you could
>>> consider copying.
>>
>> It apparently got whacked as well when the system locked up.  I'm
>> wondering if it will every get repopulated.  I also wonder how necessary
>> it is at this point.  I can remove packages without the error now.  But
>> I haven't tried installing any.  I'm guessing I'll have a problem when I
>> do, given the name "available".
> 
> apt/aptitude have their own idea of what packages are available and do
> not use what is in /var/lib/dpkg/available. So you should not have any
> problem with installing.

Others mentioned this.  If this is the case, why does "aptitude remove
--purge" throw an error trying to read /var/lib/dpkg/available.  This
would suggest aptitude calls dpkg during package removal.  Is this the case?

> You could forget about /var/lib/dpkg/available and carry on as you
> usually do. Alternatively, if it bothers you, either install dselect
> and do
> 
>    dselect update
> 
> or download a Packages.gz file and execute
> 
>    dpkg --update-avail Packages

I strictly use "aptitude" for package management.  But it appears
aptitude is not entirely standalone.  Or, is aptitude simply attempting
to keep all of the package lists up to date across the other package
management tools?

-- 
Stan


Reply to: