NetBSD pkg_add problem
#1
Posted 18 July 2008 - 07:13 PM
Since I have a pretty good understanding of Linux, I decided that I wanted to try out NetBSD. I got a completely fresh install of NetBSD 4.0 installed on one of my systems, but now that I've begun configuring it, I've also tried to install additional software from the pkgsrc system which seems like it should work quite well.
Anyways, my problem is that the pkg_add command seems to default to using IPv6 as the main protocol and I get a message saying that there is no route to the host every time I try it. I do not know whether this is a incompatibility with my router, or with my ISP, or something entirely different. However, I have searched google and many other people seem to have had this problem, usually with older versions of NetBSD (3.1?) There never seem to be any answers to these people's questions though. So I am hoping one of you can tell me how to completely disable IPv6 on NetBSD or fix the problem in some other manner.
Thanks for any help you guys might be able to give.
#2
Posted 18 July 2008 - 08:53 PM
#3
Posted 19 July 2008 - 11:26 PM
This is what I am inputting for the mirror path as well as trying to install perl.
$ export PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All/" $ export PKG_PATH $ pkg_add -v perl parsing: ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All/ path: ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All/ increasing RLIMIT_NOFILE to max. 1772 open files trying PKG_PATH ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All/ Spawning FTP coprocess ftp -detv ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All// ftp: connect to address 2001:4f8:4:7:230:48ff:fe31:43f2: No route to host ftp: connect: Connection timed out ftp: Can't connect or login to host `ftp.netbsd.org' pkg_add: expect1 failed, rc=0 pkg_add: ftp_start() failed Reusing FDs 4/5 for communication to FTP coprocess ftp> nlist perl.tbz /var/tmp/pkg.01143a SIGPIPE! pkg_add: short write: Broken pipe pkg_add: nlist failed! Reusing FDs 4/5 for communication to FTP coprocess ftp> nlist perl.tgz /var/tmp/pkg.01143b SIGPIPE! pkg_add: short write: Broken pipe pkg_add: nlist failed! Reusing FDs 4/5 for communication to FTP coprocess ftp> nlist perl-*.t[bg]z /var/tmp/pkg.01143c SIGPIPE! pkg_add: short write: Broken pipe pkg_add: nlist failed! pkg_add: no pkg found for 'perl', sorry. pkg_add: 1 package addition failed $ pkg_add -v perl-5.8.8nb8.tgz parsing: ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All/ path: ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All/ increasing RLIMIT_NOFILE to max. 1772 open files trying PKG_PATH ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All/ Spawning FTP coprocess ftp -detv ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All// ftp: connect to address 2001:4f8:4:7:230:48ff:fe31:43f2: No route to host ftp: connect: Connection timed out ftp: Can't connect or login to host `ftp.netbsd.org' pkg_add: expect1 failed, rc=0 pkg_add: ftp_start() failed pkg_add: no pkg found for 'perl-5.8.8nb8.tgz', sorry. pkg_add: 1 package addition failed
The first three lines is me setting the mirror and then attempting to install the perl package, the rest is the output. If anyone could help me make sense of the output I would greatly appreciate it. Also, this is way more output than I was getting before. Before it was just the one line that contained the IPv6 address, and the No route to host message.
#4
Posted 20 July 2008 - 08:35 AM
Please post the output of, "ifconfig -a" and "route show".
Do you use DHCP? PPPoE? or have you configured a static address? is it a direct connection? or do you have a NAT router?
This information will help figure out the problem... my current thoughts are you forgot to setup a default IPv4 route, but... it's only a guess.
#5
Posted 20 July 2008 - 10:03 AM
In my /etc/rc.conf I have the defaultroute set to 192.168.1.1, to my knowledge this is all the configuration that I needed to do but perhaps I am mistaken.
$ ifconfig -a re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 capabilities=3f80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx> enabled=0 address: 00:0f:ea:e7:39:4c media: Ethernet autoselect (100baseTX full-duplex) status: active inet 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::20f:eaff:fee7:394c%re0 prefixlen 64 scopeid 0x1 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
$ route show Routing tables Internet: Destination Gateway Flags default 192.168.1.1 UG loopback 127.0.0.1 UGR localhost 127.0.0.1 UH 192.168.1.0/24 link#1 U 192.168.1.1 00:18:f8:e6:c8:90 UHL 192.168.1.100 00:1d:60:ad:13:82 UHL 192.168.1.101 127.0.0.1 UGH Internet6: Destination Gateway Flags ::/104 localhost UGR ::/96 localhost UGR localhost localhost UH ::127.0.0.0 localhost UGR ::224.0.0.0 localhost UGR ::255.0.0.0 localhost UGR ::ffff:0.0.0.0 localhost UGR 2001:db8:: localhost UGR 2002:: localhost UGR 2002:7f00:: localhost UGR 2002:e000:: localhost UGR 2002:ff00:: localhost UGR fe80:: localhost UGR fe80::%re0 link#1 U fe80::20f:eaff:fee7:394c%re0 00:0f:ea:e7:39:4c UHL fe80::%lo0 fe80::1%lo0 U fe80::1%lo0 link#2 UHL ff01:1:: link#1 U ff01:2:: localhost U ff02::%re0 link#1 U ff02::%lo0 localhost U
#6
Posted 22 July 2008 - 08:46 PM
#7
Posted 03 October 2008 - 03:52 AM
#8
Posted 14 October 2008 - 10:11 PM
I have since decided to try out a different flavor of BSD when I get a chance. I am leaning towards OpenBSD but am keeping an open mind. Mostly I just want to learn about the differences between BSD and teach myself the skills necessary to run it on a production system rather than simply toy around with it.
#9
Posted 27 October 2008 - 06:14 PM
I never did figure that problem out. From what I could figure out, it was either my home router or my ISP that did not support IPv6 which caused the program to hang. The documentation on how to disable IPv6 totally in NetBSD also did not work on my machine.
Couple of things that crossed my mind:
- do a "ftp -4 [url="ftp://ftp.netbsd.org/pub/""]ftp://ftp.netbsd.org/pub/"[/url] so that it fetches the IPv4 address and then try with pkg_add;
- try other nameservers on resolv.conf (I have had probs in the past with home routers that didn't handle IPv6 requests that well) or even run your own local caching dns server for bonus points (I think NetBSD includes bind by default).
#10
Posted 28 October 2008 - 05:11 PM
#11
Posted 05 May 2009 - 02:26 PM
This doesn't work:
[codebox]export PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All/"[/codebox]
This works:
[codebox]export PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD-4.0/i386/All"[/codebox]
Edited by Lynk, 05 May 2009 - 02:28 PM.
BinRev is hosted by the great people at Lunarpages!











