pkg don't recognize installed packages
nanotek at bsdbox.co
Sat Apr 19 03:39:39 UTC 2014
Perhaps a more important question is: What problems with local.sqlite were you having that made it necessary to delete? Backups notwithstanding, surely database repopulation should be possible without reinstalling all ports.
On 19 April 2014 5:01:47 am AEST, Matthew Seaman <m.seaman at infracaninophile.co.uk> wrote:
>On 18/04/2014 18:01, lokadamus at gmx.de wrote:
>> System is 10.0-RELEASE-p1 (clean install in january) and last week
>> was working fine.
>> In december i had trouble with /var/db/pkg/local.sqlite and had to
>> remove it for a new one.
>> This time this way isn't working. It creates a new local.sqlite, but
>> dosn't recognize
>> installed programs.
>Right. This is obviously relevant information you might have
>including in your original posting.
>> Is there a command that pkg will reread all installed ports?
>> Or can portmaster do this?
>local.sqlite is *the* database of installed packages. If you destroy
>it, there's nowhere else pkg(8) can get the information about what
>packages are already installed. That's why there are periodic jobs to
>take a backup each night, which you might find in /var/backups.
>Hopefully it hasn't been so long that there is still useful data
>Failing that, you will need to reinstall all your packages to
>your package database.
>Today's lesson is this: deleting the package database is not a good
>idea. Two seconds to do, hours if not days to recover and forever
>afterwards to regret.
>Dr Matthew J Seaman MA, D.Phil.
>JID: matthew at infracaninophile.co.uk
Sent from my Android device with K-9 Mail. Please excuse my brevity.
More information about the freebsd-questions