Discussion:
OpenBSD 3.7 x86 pkg_add error
Mick Dann
2005-09-11 16:13:06 UTC
Permalink
I'm a newb at this, I have been trying to get a working OpenBSD
machine since about 3.2 but I usually get as far as the first reboot
than don't get any further - my Libretto 70CT now has a serious
identity crisis.

Now I've installed OpenBSD 3.7 on an AMD Athlon system to make a NFS
server for my mini mac to talk to - all seems OK so far, except:

Just trying to get KDE installed and having some trouble.

I'm typing this:

pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/3.7/packages/i386/
kdebase-3.3.2p3.tgz

I get this back:

Bad pkg_db: No such file or directory at usr/libdata/perl5/OpenBSD/
PackageInfo.pm line 60.

Line 60 of said PackageInfo.pm is "opendir(my $dir, $pkg_db) or die
"Bad pkg_db: $!";

So, I'm thinking this has got something to do with a variable
($pkg_db) but since I was up until 4am last night installing this,
completely getting the wrong end of the stick regarding mounting
CDROM's and flash memory pen drives etc, my brain is now fried and I
can't look at any more man pages !

Any pointers as to what might be wrong/missing would be much
appreciated.

Thanks

Mick Dann
scorch
2005-09-11 21:39:23 UTC
Permalink
Hi Mick,
Post by Mick Dann
I'm a newb at this, I have been trying to get a working OpenBSD
machine since about 3.2 but I usually get as far as the first reboot
than don't get any further - my Libretto 70CT now has a serious
identity crisis.
posting a dmesg may help you on the libretto issue -- you should be able
Post by Mick Dann
Now I've installed OpenBSD 3.7 on an AMD Athlon system to make a NFS
Just trying to get KDE installed and having some trouble.
pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/3.7/packages/i386/
kdebase-3.3.2p3.tgz
you appear to have a space in the wrong place.
ftp://ftp.openbsd.org/pub/OpenBSD/3.7/packages/i386/kdebase-3.3.2p3.tgz
works just fine here. seems like a lack of sleep more than anything else ;-)

suggestion -- use pkg_add -v in future.

cheers, scorch
--
out of the frying pan and into the fire
Mick Dann
2005-09-11 22:32:33 UTC
Permalink
Thanks Scorch,

As regards the Libretto, I didn't have too much trouble with the
install(s), I just used it to get my head around the whole disklabel
thing - I just never got any further with actually having a running
machine with configured software etc - the whole ports and packages
concept stumped me.

Now I understand it a little better (not much), working out what I
need to get and where from etc, so I'm further than I have been before.

Now onto, the Athlon issue, thanks for the suggestions, you are right
about the lack of sleep, however, the problem still exists :(

I used the verbose switch as suggested, and took out the space (duh !
did I really type that out so many times ? what was I thinking ?)

So, now I type:

pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/3.7/packages/i386/
kdebase-3.3.2p3.tgz

and I get:

parsing kdebase-3.3.2p3 (woohoo, that's encouraging)

then

Bad pkg_db: No such file or directory at usr/libdata/perl5/OpenBSD/
PackageInfo.pm line 60. (oh, that looks horribly familiar)

*shrug*

If anyone knows what the little routine around line 60 is supposed to
be doing and what's stopping it, let me know.

This is not an urgent request btw, this is just a project to
eradicate the last remnants of MS Windows from my house.

Mick
Post by scorch
Hi Mick,
Post by Mick Dann
I'm a newb at this, I have been trying to get a working OpenBSD
machine since about 3.2 but I usually get as far as the first
reboot than don't get any further - my Libretto 70CT now has a
serious identity crisis.
posting a dmesg may help you on the libretto issue -- you should be
Post by Mick Dann
Now I've installed OpenBSD 3.7 on an AMD Athlon system to make a
Just trying to get KDE installed and having some trouble.
pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/3.7/packages/i386/
kdebase-3.3.2p3.tgz
you appear to have a space in the wrong place. ftp://
ftp.openbsd.org/pub/OpenBSD/3.7/packages/i386/kdebase-3.3.2p3.tgz
works just fine here. seems like a lack of sleep more than anything else ;-)
suggestion -- use pkg_add -v in future.
cheers, scorch
--
out of the frying pan and into the fire
scorch
2005-09-13 10:09:17 UTC
Permalink
Post by scorch
pkg_add -v
ftp://ftp.openbsd.org/pub/OpenBSD/3.7/packages/i386/kdebase-3.3.2p3.tgz
parsing kdebase-3.3.2p3 (woohoo, that's encouraging)
Bad pkg_db: No such file or directory at
usr/libdata/perl5/OpenBSD/PackageInfo.pm line 60. (oh, that looks
horribly familiar)
my $pkg_db = $ENV{"PKG_DBDIR"} || '/var/db/pkg';
[...]
opendir(my $dir, $pkg_db) or die "Bad pkg_db: $!";
while (my $e = readdir($dir)) {
next if $e eq '.' or $e eq '..';
next unless -d "$pkg_db/$e";
if (! -r _) {
push(@bad, $e);
next;
}
if (-f "$pkg_db/$e/+CONTENTS") {
$list->{$e} = 1;

hmm seems something is up with your pkg db. what does the following show?

export | grep PKG_
ls -Fl /var/db/pkg

PKG_DBDIR should be blank, /var/db/pkg should be full of things like this:
drwxr-xr-x 2 root wheel 512 Jul 10 14:52 python-2.3.5/
drwxr-xr-x 2 root wheel 512 Jun 3 01:52 recode-3.6p2/
drwxr-xr-x 2 root wheel 512 Jun 14 21:53 rsync-2.6.3/
...

try doing a rm -rf /var/db/pkg/kdebase-3.3.2p3, then download ftp://ftp.openbsd.org/pub/OpenBSD/3.7/packages/i386/kdebase-3.3.2p3.tgz to somewhere local like /var/tmp to save bandwidth.

then try sudo pkg_add -nv /var/tmp/kdebase-3.3.2p3.tgz
& let us know the output of that & the environment above. if it fails, does cd /tmp; tar tvzf /var/tmp/kdebase-3.3.2p3.tgz succeed?

cheers, scorch
--
out of the frying pan and into the fire

Loading...