PDA

View Full Version : "pkg_add -r pkg" fails with could not find package


cartland
November 8th, 2012, 06:40
My first time installing FreeBSD. After a week of pouring over the forums, handbook, etc, and several attempts (taking incremental snapshots), I finally got an error free installation in a VirtualBox VM including KDE and NFS to the Ubuntu host (Linux Mint 13 actually) :e.

I still haven't quite grokked the packages/ports RELEASE/STABLE/CURRENT stuff yet. So thought I'd finally ask a question relating to packaging.

Based on ports-mgmt/pkg, I run "pkg_add -r pkg" and get

Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.0-release/Latest/pkg.tbz: File unavailable (e.g., file not found, no access)

Since my understanding is somewhat :q despite reading the handbook (probably missed something), can someone point me in the right direction - i.e. what are the high-level steps I need to take to install pkgng?

BTW:
I notice pkg-1.0.1.tbz exists in
ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/ports-mgmt
ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/ports-mgmt
So I tried the stable version (pkg_add ftp:.....). Seemed to work but is this approach advisable in general?

thanks

SirDice
November 8th, 2012, 08:57
If you installed the 9.1 release candidate you can simply run pkg and it'll bootstrap itself.

cartland
November 9th, 2012, 01:21
After running pk2ng I get errors:

pkg: Skipping malformed dependency perl-threaded
I originally removed it with pkg_delete -f because some sysinstall package wanted the non-threaded version which conflicted (can't remember the package - kde or X11 I think).

pkg: lstat(....): No such file or directory
Got a bunch of these.

3. Finally at the end:

Some packages failed to register .. : libungif-4.1.4_5

And with PACKAGESITE = ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.0-RELEASE/packages/Latest/

pkg update gives

pkg: ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.0-RELEASE/packages/Latest//repo.txz: File unavailable (e.g., file not found, no access)

How best should I proceed?

thanks

jb_fvwm2
November 9th, 2012, 04:56
set PACKAGESITE to 9-STABLE? (Search the forum for PACKAGESITE threads, one or more will show completely how.)

cartland
November 9th, 2012, 06:30
set PACKAGESITE to 9-STABLE? (Search the forum for PACKAGESITE threads, one or more will show completely how.)

Thanks - I've had a search around - most discussion is related to pkg_add.

At the moment I am getting by using pkg_add with
PACKAGESITE=ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/

However I'd like to get pkgng working.

In my pkg.conf file, I tried a few different variations under "http://pkgbeta.freebsd.org/freebsd-9-amd64/" where repo.txz exists

but they all give the same error below - e.g.

pkg: http://pkgbeta/freebsd.org/freebsd-9-amd64/latest/repo.txz: No address record

cartland
November 9th, 2012, 07:09
set PACKAGESITE to 9-STABLE? (Search the forum for PACKAGESITE threads, one or more will show completely how.)

Updating /usr/local/etc/pkg.conf with PACKAGESITE: http://pkgbeta.freebsd.org/freebsd-9-amd64/latest (not http://pkgbeta/freebsd.org/freebsd-9-amd64/latest :r) worked.

thanks.