Subject: Re: I have problems installing the PostgreSQL package
To: Nigel Reed <nigel@nelgin.nu>
From: Lasse =?iso-8859-1?Q?Hiller=F8e?= Petersen <lhp@toft-hp.dk>
List: netbsd-help
Date: 11/16/2000 17:48:30
>What platform are you installing on and do you have the latest
>postgresql package? I'm using i386/ALPHA_2 here and just installed
>PosgreSQL 7.0.2 from the package system without any problem.
Sorry, I should have included that:
NetBSD 1.5_BETA2 i386
I got latest pkgsrc with sup a few days ago.
>Try doing a make clean or make distclean in the
>/usr/pkgsrc/databases/postgresql directory and run make again and
>check for any errors, also check the make install process for
>errors too.
I have tried a make clean followed by make update (to handle the p5 DBD
dependency) before, but I tried again.
I just did (standing in /usr/pkgsrc/databases/postgresql):
188 17:29 sudo pkg_delete p5-pgsql-1.8.1
189 17:29 sudo pkg_delete p5-DBD-postgresql-0.93
190 17:29 sudo pkg_delete postgresql
191 17:30 sudo rm -rf /usr/pkg/pgsql
193 17:30 sudo vipw
# deleted my manually added pgsql user
196 17:31 sudo make clean
197 17:31 sudo make distclean
200 17:31 make
201 17:44 sudo make install
(a few ls'es and such omitted)
>Finally, you did it it as root, right?
As lhp (member of wheel); make install asks for root password, isn't that
enough? This time I used sudo for the install, no difference.
In the beginning of the install it says:
===> Installing for postgresql-7.0.2
/usr/bin/sed -e 's|@PGUSER@|pgsql|g' -e 's|@PGHOME@|/usr/pkg/pgsql|g'
< /usr/pkgsrc/databases/postgresql/pkg/DEINSTALL >
/usr/pkgsrc/databases/postgresql/work/DEINSTALL
/usr/bin/sed -e 's|@PGUSER@|pgsql|g' -e 's|@PGGROUP@|ingres|g' -e
's|@PGHOME@|/usr/pkg/pgsql|g' -e 's|@USERDIR@|/usr/sbin|g' <
/usr/pkgsrc/databases/postgresql/pkg/INSTALL >
/usr/pkgsrc/databases/postgresql/work/INSTALL
PKG_PREFIX=/usr/pkg /bin/sh /usr/pkgsrc/databases/postgresql/work/INSTALL
postgresql-7.0.2 PRE-INSTALL
------------------------------------------------------------
Dump existing databases, before installing new db version !!
------------------------------------------------------------
Group 'ingres' already exists...proceeding.
Creating 'pgsql' user...
user: home directory `/usr/pkg/pgsql' already exists
Done.
So it _claims_ to create user pgsql, but it really doesn't. That's what I
find confusing.
/usr/pkg/pgsql now has ingres as group, but root as owner.
Ahh, I think I see something now: could it be that the install creates
/usr/pkg/pgsql, then user add sees it, and fails to create the user?
work/INSTALL creates the user with
echo "Creating '${USER}' user..."
${USERDIR}/user add \
-c "PostgreSQL database administrator" \
-d ${PGHOME} \
-g ${GROUP} -s /bin/sh ${USER}
echo "Done."
I just tried:
sudo user add -c "Testing user creation" -d /tmp -g ingres -s /bin/sh pgtest
and got:
user: home directory `/tmp' already exists
And user pgtest was not created. This must be it: something has changed in
useradd between ALPHA2 and BETA2 I guess? Should I file a bug report?
-Lasse