rebuilding pkg_install fails

Francois Tigeot ftigeot at wolfpond.org
Thu Aug 11 05:28:05 PDT 2011


Hi Pierre,

On Thu, Aug 11, 2011 at 01:15:56AM -0400, Pierre Abbat wrote:
> On Thursday 11 August 2011 00:06:22 Justin Sherrill wrote:
> > I've built the pkgsrc bootstrap for 2011Q2 several times over
> > recently, and I didn't encounter this.
> >
> > I assume there's something out of place on your machine that's
> > confusing the build.  Maybe try doing a 'bmake clean'?  That
> > suggestion sounds kinda weak now that I said it.
> 
> Tried that. Didn't fix it.

I don't know what exactly is wrong on your system, but so far I've reliably
managed to cure all my pkgsrc issues by nuking the existing installation
and rebuilding it from scratch:

0. update your pkgsrc sources
	be sure to use a quaterly release to avoid unnecessary trouble
	
1. move away your old pkgsrc installation
	mv /usr/pkg/usr/pkg.old
	mv /var/db/pkg /var/db/pkg.old
	mv /var/db/pkg.refcount /var/db/pkg.refcount.old

2. reuse your existing configuration files
	mkdir /usr/pkg
	mv /usr/pkg.old/etc /usr/pkg

3. bootstrap pkgsrc from scratch
	cd /usr/pkgsrc/bootstrap
	./bootstrap && ./cleanup

4. reinstall your programs
	you may want to start with your favorite shell and add basic utilities
	such as devel/scmgit-base and such before trying to tackle more
	complicated software

You can always go back to the old pkgsrc installation preserved in
/usr/pkg.old

-- 
Francois Tigeot





More information about the Users mailing list