pkgsrc-Users archive

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

Re: pkg_add failed for Perl (during a pkg_chk -u)

Luca Ferrari <> writes:

> Thanks for the suggestion, but it did not provide much more help to me:
> # pkg_admin -v check
> pkg_admin: can't open /var/db/pkg/perl-5.14.2nb5/+CONTENTS: No such
> file or directory

Basically your installation is damaged.  Did you have a crash?

So first, make a backup :-) Then, the following may help, but you may
end up with no packages.

Look in /var/db/pkg.   If you find directories with no +CONTENTS, then
rm -rf them.  This removes the record of the package being installed.
Keep a list of packages that you do this to.

Run "pkg_admin check".  Keep looking for broken /var/db/pkg dirs and
removing them.  pkg_admin rebuild-tree and pkg_admin rebuild may be
helpful as well (you may find that you have packages listed in
+REQUIRED_BY that are not installed).

Then, install pkg_rolling-replace, read the man page, and read the
archives for all the discussion about it :-).   (I find that 'make
update' is too scary.)  Do 'make package' for packages that you removed
the db directory for.

Or, make a list of all the packages you want, and 
  back up /usr/pkg/etc
  rm -rf /usr/pkg
  rm -rf /var/db/pkg/*
  start over building  what you want.

Attachment: pgpmnZMInBgTp.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index