Having successfully configured and compiled nsd (--prefix=/usr/local/nsd/3.2.2), the following happens when I try to install it:-
$ sudo make install
./install-sh -c -d /usr/local/nsd/3.2.2/sbin
./install-sh -c -d /usr/local/nsd/3.2.2/etc/nsd
./install-sh -c -d /usr/local/nsd/3.2.2/var/db/nsd/
mkdir: cannot create directory `/usr/local/nsd/3.2.2/var/db/nsd/': File exists
make: *** [install] Error 1
$ sudo make install
./install-sh -c -d /usr/local/nsd/3.2.2/sbin
./install-sh -c -d /usr/local/nsd/3.2.2/etc/nsd
./install-sh -c -d /usr/local/nsd/3.2.2/var/db/nsd/
./install-sh -c -d /usr/local/nsd/3.2.2/var/db/nsd
./install-sh -c -d /usr/local/nsd/3.2.2/share/man
./install-sh -c -d /usr/local/nsd/3.2.2/share/man/man8
./install-sh -c -d /usr/local/nsd/3.2.2/share/man/man5
./install-sh -c nsd /usr/local/nsd/3.2.2/sbin/nsd
./install-sh -c zonec /usr/local/nsd/3.2.2/sbin/zonec
./install-sh -c nsdc.sh /usr/local/nsd/3.2.2/sbin/nsdc
./install-sh -c nsd-notify /usr/local/nsd/3.2.2/sbin/nsd-notify
./install-sh -c nsd-checkconf /usr/local/nsd/3.2.2/sbin/nsd-checkconf
./install-sh -c nsd-patch /usr/local/nsd/3.2.2/sbin/nsd-patch
./install-sh -c nsd-xfer /usr/local/nsd/3.2.2/sbin/nsd-xfer
./install-sh -c -m 644 ./nsd.8 /usr/local/nsd/3.2.2/share/man/man8
./install-sh -c -m 644 ./nsdc.8 /usr/local/nsd/3.2.2/share/man/man8
./install-sh -c -m 644 ./zonec.8 /usr/local/nsd/3.2.2/share/man/man8
./install-sh -c -m 644 ./nsd-notify.8 /usr/local/nsd/3.2.2/share/man/man8/nsd-notify.8
./install-sh -c -m 644 ./nsd-checkconf.8 /usr/local/nsd/3.2.2/share/man/man8/nsd-checkconf.8
./install-sh -c -m 644 ./nsd-patch.8 /usr/local/nsd/3.2.2/share/man/man8/nsd-patch.8
./install-sh -c -m 644 ./nsd-xfer.8 /usr/local/nsd/3.2.2/share/man/man8/nsd-xfer.8
./install-sh -c -m 644 ./nsd.conf.5 /usr/local/nsd/3.2.2/share/man/man5/nsd.conf.5
./install-sh -c -m 644 nsd.conf.sample /usr/local/nsd/3.2.2/etc/nsd/nsd.conf.sample
As you can see, simply repeating the command causes it to complete successfully. The host is running GNU/Linux 2.6.25.3 i686.
Regards,
Chris Hills
a message of 48 lines which said:
mkdir: cannot create directory `/usr/local/nsd/3.2.2/var/db/nsd/': File
exists
I believe it is the same problem as reported here for Gentoo, OpenBSD,
etc. The attached patch should solve it.
********************** dir.patch ***********************
--- Makefile.in.orig 2009-05-20 23:26:57.000000000 +0200
+++ Makefile.in 2009-05-20 23:29:03.000000000 +0200
@@ -318,8 +318,6 @@
install: all
$(INSTALL) -d $(DESTDIR)$(sbindir)
$(INSTALL) -d $(DESTDIR)$(configdir)
- $(INSTALL) -d $(DESTDIR)$(piddir)
- $(INSTALL) -d $(DESTDIR)$(dbdir)
$(INSTALL) -d $(DESTDIR)$(mandir)
$(INSTALL) -d $(DESTDIR)$(mandir)/man8
$(INSTALL) -d $(DESTDIR)$(mandir)/man5
I ran make install twice and the second time it didn't have any problem.
Sameer
Stephane Bortzmeyer wrote:
a message of 48 lines which said:
mkdir: cannot create directory `/usr/local/nsd/3.2.2/var/db/nsd/': File exists
I believe it is the same problem as reported here for Gentoo, OpenBSD,
etc. The attached patch should solve it.
I think the root of the problem is an additional '/' in configure.ac.
As I can see the determination of the $piddir has been changed in 3.2.2. Trunk and 3.2.1 has an other solution without this problem, I guess there is a good reason why 3.2.2 is different, unfortunately it has this small issue.
After delete it and run autoconfig installation (in my case RPM build) will run without any problem.
Here is the patch (remove the '/' after $piddir value):
Hello, Is this case already be closed?
>> mkdir: cannot create directory `/usr/local/nsd/3.2.2/var/db/nsd/': File
>> exists
>
> I believe it is the same problem as reported here for Gentoo, OpenBSD,
> etc. The attached patch should solve it.
I think the root of the problem is an additional '/' in configure.ac.
I experience similar problem as this today, but mine is
caused by $configdir rather $piddir. The platform is NetBSD
5.0.
According to my drill down, mkdir /sandbox/nsd/etc/
(configdir in this case) seems to be invoked twice by
install-sh in line #184 and #195.
As Sammer mentioned on Jun 16, run make install twice is
workaround for me, too, so it is not so serious problem.
Thanks
Koh-ichi Ito