DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 19th August 2008
pormogo pormogo is offline
Port Guard
 
Join Date: Jun 2008
Posts: 10
Thanked 0 Times in 0 Posts
Default Help! My system "lost" my bind94 package...

Let me preference this by saying I am first and foremost a linux user. So much of my experience with freebsd thusfar can be summerized by saying it's been "difficult" for me. So I installed the latest STABLE branch of FreeBSD (7.0) on this box with the intention of setting up a DNS server. After the install I decided to fetch the ports collection so I could install additional software. I assumed that this collection would be up to date, it turns out it wasn't.

I started by installing some of my personal "essential" utilities (vim, bash, screen, etc.). I finished off by navigating into /usr/ports/dns/bind9 and building the latest version of bind, which ended up being 9.4.x. I built this port using the basic

$ make && make install

command. It built fine, however i wanted the newest version of bind (as well as my other ports that I had installed). So I did the following

$ portsnap update && portsnap extract

I then built the portupgrade port and performed a portupgrade -a to update all of my installed ports. For some strange reason it decided to install bind-9.3 along side bind-9.4.... At this point my bind9.4 package I had originally install had disappeared from the output of pkg_info. However it was still the main version of named installed (as returned by the which) command.

First I used the pkg_deinstall command to remove bind-9.3 this seemed to work perfectly. However it looked like the bind-9.4 package was totally lost. So I tried to go into /usr/ports/dns/bind95 to build the newest version and just install that over whatever old files happened to be present from 9.4. (in between these steps I tried to use pkg_which and pkgdb -F in order to get the package showing up again, no dice, output from pkg_which on the binary yields only ?).

So I used the command $ portinstall bind95 and it started building bind95. I got an ncurses looking screen with some options. I tried selecting the option to "replace bind" thinking maybe this would replace my version of bind with 9.5. Not dice. Shortly after making the confirmation I got an exit code...

hmmm ok.....

So I tried going into bind9's directory and doing a make deinstall no dice. Out of what I'm sure was pure frustration I navigated back into the bind95 directory and did a make clean && make && make install with that port. Below is the output at the end of the install (unfortunately being a n00b I didn't capture the output so I only have the end).

Code:
/bin/sh ../../mkinstalldirs /usr/sbin
/bin/sh ../../mkinstalldirs /usr/share/man/man5
/bin/sh ../../mkinstalldirs /usr/share/man/man8
install  -s -o root -g wheel -m 555 named /usr/sbin
(cd /usr/sbin; rm -f lwresd; ln named lwresd)
install  -o root -g wheel -m 444 ./named.8 /usr/share/man/man8
install  -o root -g wheel -m 444 ./lwresd.8 /usr/share/man/man8
install  -o root -g wheel -m 444 ./named.conf.5 /usr/share/man/man5
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/rndc
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/rndc/unix
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/rndc/unix
/bin/sh ../../mkinstalldirs /usr/sbin
/bin/sh ../../mkinstalldirs /usr/share/man/man8
/bin/sh ../../mkinstalldirs /usr/share/man/man5
install  -s -o root -g wheel -m 555 rndc /usr/sbin
install  -s -o root -g wheel -m 555 rndc-confgen /usr/sbin
install  -o root -g wheel -m 444 ./rndc.8 /usr/share/man/man8
install  -o root -g wheel -m 444 ./rndc-confgen.8 /usr/share/man/man8
install  -o root -g wheel -m 444 ./rndc.conf.5 /usr/share/man/man5
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/dig
/bin/sh ../../mkinstalldirs /usr/bin
/bin/sh ../../mkinstalldirs /usr/share/man/man1
install  -s -o root -g wheel -m 555  dig /usr/bin
install  -s -o root -g wheel -m 555  host /usr/bin
install  -s -o root -g wheel -m 555  nslookup /usr/bin
for m in dig.1 host.1 nslookup.1; do  install  -o root -g wheel -m 444 ./$m /usr/share/man/man1;  done
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/dnssec
/bin/sh ../../mkinstalldirs /usr/sbin
/bin/sh ../../mkinstalldirs /usr/share/man/man8
for t in dnssec-keygen dnssec-signzone; do  install  -s -o root -g wheel -m 555 $t /usr/sbin; done
for m in dnssec-keygen.8 dnssec-signzone.8; do install  -o root -g wheel -m 444 ./$m /usr/share/man/man8; done
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/db
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/dst
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/master
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/mem
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/names
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/net
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/rbt
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/sockaddr
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/tasks
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/timers
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/system
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/system/lwresd
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/system/tkey
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/db
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/dst
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/master
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/mem
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/names
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/net
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/rbt
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/sockaddr
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/tasks
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/timers
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/system
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/system/lwresd
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/system/tkey
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/system/lwresd
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/tests/system/tkey
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/nsupdate
/bin/sh ../../mkinstalldirs /usr/bin
/bin/sh ../../mkinstalldirs /usr/share/man/man8
install  -s -o root -g wheel -m 555 nsupdate /usr/bin
install  -o root -g wheel -m 444 ./nsupdate.8 /usr/share/man/man8
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/check
/bin/sh ../../mkinstalldirs /usr/sbin
/bin/sh ../../mkinstalldirs /usr/share/man/man8
install  -s -o root -g wheel -m 555 named-checkconf /usr/sbin
install  -s -o root -g wheel -m 555 named-checkzone /usr/sbin
(cd /usr/sbin; rm -f named-compilezone; ln -s named-checkzone named-compilezone)
for m in named-checkconf.8 named-checkzone.8; do install  -o root -g wheel -m 444 ./$m /usr/share/man/man8; done
(cd /usr/share/man/man8; rm -f named-compilezone.8; ln -s named-checkzone.8 named-compilezone.8)
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/doc
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/doc/arm
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/doc/misc
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/doc/xsl
making all in /usr/ports/dns/bind95/work/bind-9.5.0-P2/doc/doxygen
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/doc/arm
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/doc/misc
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/doc/xsl
making install in /usr/ports/dns/bind95/work/bind-9.5.0-P2/doc/doxygen
/bin/sh ./mkinstalldirs /usr/bin  /var/run /etc/namedb
mkdir /etc/namedb
mkdir: /etc/namedb: File exists
*** Error code 1

Stop in /usr/ports/dns/bind95/work/bind-9.5.0-P2.
*** Error code 1

Stop in /usr/ports/dns/bind95.
*** Error code 1

Stop in /usr/ports/dns/bind95.
Now while this did error out and give me a stop code it did appear to over write my previous installation of bind.

$ named -v
BIND 9.5.0-P2


So now I have the newest version of bind up and running (I checked and it's answering queries and serving zones as it should). But it's still not showing up in pkg_info. How can I get this package to be targetable by the pkg system again? named is really the only application I need the package system to actually manage (as it's the reason for this machines existence). Any help is most appreciated. I will gladly provide any other information that might be needed. Thanks in advance for any help.
Reply With Quote
  #2   (View Single Post)  
Old 19th August 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,070
Thanked 198 Times in 156 Posts
Default

Move /etc/named out of the way, then try installing bind again.

In addition, I would not use portupgrade and related tools, in my experience it only makes things more difficult rather than easier by adding a ``magic'' abstraction layer over a relatively simple system, while this does provide some benefits, IMO the disadvantages greatly outweigh the benefits.

Quote:
$ make && make install
This is the same as just using make install, no need to run make twice.

Quote:
$ portsnap update && portsnap extract
This is the same as:
# portsnap update extract
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 19th August 2008
pormogo pormogo is offline
Port Guard
 
Join Date: Jun 2008
Posts: 10
Thanked 0 Times in 0 Posts
Default

Thanks for the help, I'm going to give that a try today. I'll take your word for it and try and avoid using pkgtools in order to manage ports. After it randomly decided downgrading Bind was a good idea I started questioning how good of an idea using that tool is.

Once again thanks for the help

EDIT: So I moved that folder out of the way and did a make install on bind95 again and low and behold

bind95-base-9.5.0.2

YAY!!! Thanks for the help! I'll be taking your advice and staying away from portupgrade in the future

Last edited by pormogo; 19th August 2008 at 05:11 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" jb_daefo Guides 0 5th October 2009 09:31 PM
"Thanks" and "Edit Tags". diw Feedback and Suggestions 2 29th March 2009 12:06 AM
"No package available in the PKG_PATH" error Nk2Network OpenBSD Packages and Ports 19 12th January 2009 09:22 PM
Scripted sysinstall fails with "Command 'system' failed" PeterSteele FreeBSD Installation and Upgrading 0 13th November 2008 11:31 PM


All times are GMT. The time now is 09:25 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick