Solved [Solved] PKGNG issue - Fresh 9.1 install

So I did a fresh install of 9.1.

Right away before installing any software I decided to switch over to PKGNG. I followed the instructions in the Handbook. When trying to install anything I received
Code:
PACKAGESITE in pkg.conf is deprecated

So I followed the fix/instructions in this post: http://forums.freebsd.org/viewtopic.php?t=43506. That did not work. I have placed FreeBSD.conf in /etc, /etc/pkg and /usr/local/etc/pkg/repos. I have copied pkg.conf.sample into /usr/local/etc/pkg as pkg.conf. I have removed one or the others from another post I have read due to the version of PKGNG I use. I am on version 1.2.2.

I am also getting the following error when I go to install a package.
Code:
Updating repository catalogue
pkg: sqlite: no such table: pkg_annotation
pkg: sqlite: cannot rollback - no transaction is active
pkg: Unable to find catalogs

I'm a little lost on why this is so difficult to set up when all the information should be in the Handbook. Any help would be greatly appreciated.
 
Re: PKGNG issue - Fresh 9.1 install

/etc/pkg/FreeBSD.conf:
Code:
FreeBSD: { 
  url             : "pkg+http://pkg1.nyi.FreeBSD.org/${ABI}/latest",
  enabled         : yes,
  mirror_type     : "SRV",
}
... is pretty much all the configuration you'll need.

Note that I've specified the exact server I want to use as I've found out that just using pkg.FreeBSD.org and letting it connect you to a random (or the closest?) mirror doesn't work properly (e.g. it can't find any new package when you're upgrading).
 
Re: PKGNG issue - Fresh 9.1 install

Thanks for the reply @Beastie. I have done just that. Also, before you responded I saw a post where someone updated theirs to the latest and it fixed their issues. I upgrade to 1.2.3 and it's still not working and it's giving me another error now.

Code:
# pkg2ng
Converting packages from /var/db/pkg
Converting pkg-1.2.3...
pkg: Unable to open plist file: %s(/var/db/pkg/pkg-1.2.3/+CONTENTS): No such file or directory
Skipping invalid package: /var/db/pkg/pkg-1.2.3

# pkg install gnome2
Updating repository catalogue
pkg: sqlite: no such table: pkg_annotation
pkg: sqlite: cannot rollback - no transaction is active
pkg: Unable to find catalogs
 
Last edited by a moderator:
Re: PKGNG issue - Fresh 9.1 install

I'm going to mess with it for a bit when I get home. If I can't fix it before bed I'm just going to reinstall 9.1. I need to have a system working ASAP. If I do, I will throw up a VM and see if I can recreate it. But I may have to stick with the good old pkg_* system.
 
Re: PKGNG issue - Fresh 9.1 install

@kpa, you the man. That fixed it. I appreciate it!
 
Last edited by a moderator:
Re: PKGNG issue - Fresh 9.1 install

gentoobob said:
I'm just going to reinstall 9.1. I need to have a system working ASAP.
Sorry that my reply comes a bit late, but even if your problem was solved I need to say this: ports/packages on one hand and the FreeBSD base system on the other hand are completely separate things so you'll never need to reinstall the entire system if you ever encounter a problem with third-party applications (it's just a matter of removing the files and directory hierarchies used by these applications). With the new package management system it gets even more separate as it is itself a third-party application (although developed by the FreeBSD project).

I've noticed that removing the downloaded repo-FreeBSD.sqlite database as suggested by @kpa is the solution to many problems. So it may be a good first step any time you have a problem (at least for the time being). The compressed database that gets downloaded is small enough anyway (~6 MB).

Also, if the periodic scripts don't run on your system, it would be a good idea to make manual backups of the local.sqlite database ( pkg backup -d /var/backups/local.sqlite). If that one gets corrupted like it did last week on my system you'll have to reinstall every application from scratch (AFAIK).
 
Last edited by a moderator:
Back
Top