Jump to content


Photo
- - - - -

NetBSD pkg_add problem


  • Please log in to reply
10 replies to this topic

#1 Pharoh

Pharoh

    SUP3R 31337

  • Members
  • 154 posts
  • Location:MI, USA

Posted 18 July 2008 - 07:13 PM

Hi everyone,

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 BSDfan

BSDfan

    SUPR3M3 31337 Mack Daddy P1MP

  • Banned
  • 300 posts

Posted 18 July 2008 - 08:53 PM

If the domain has a AAAA record, it will default to IPv6 connectivity, as soon as it determines you have no IPv6 connectivity it'll fall back to the IPv4 address... it shouldn't freeze up, try another mirror.

#3 Pharoh

Pharoh

    SUP3R 31337

  • Members
  • 154 posts
  • Location:MI, USA

Posted 19 July 2008 - 11:26 PM

I am using the NetBSD documentation on pkgsrc found here: http://netbsd.org/do...binary-packages

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 BSDfan

BSDfan

    SUPR3M3 31337 Mack Daddy P1MP

  • Banned
  • 300 posts

Posted 20 July 2008 - 08:35 AM

Have you configured your interface properly?

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 Pharoh

Pharoh

    SUP3R 31337

  • Members
  • 154 posts
  • Location:MI, USA

Posted 20 July 2008 - 10:03 AM

I connect to my network through my router's DHCP server.
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 Pharoh

Pharoh

    SUP3R 31337

  • Members
  • 154 posts
  • Location:MI, USA

Posted 22 July 2008 - 08:46 PM

Can anyone help me out with this? I would really like to learn about this, and the documentation provided does not thoroughly explain the pkgsrc configuration process and does not explain this error. Any searching that I've done has only produced others asking the same question, but there are never any answers.

#7 schneis

schneis

    the 0ne

  • Members
  • 1 posts

Posted 03 October 2008 - 03:52 AM

I've run into the exact same problem. Had switched to Linux about a decade ago and am trying to fire up a BSD system for the first since that switch. The lack of documentation or preinstalled utils is VERY fustrating.

#8 Pharoh

Pharoh

    SUP3R 31337

  • Members
  • 154 posts
  • Location:MI, USA

Posted 14 October 2008 - 10:11 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.

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 jnash2001

jnash2001

    Will I break 10 posts?

  • Members
  • 7 posts

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 Pharoh

Pharoh

    SUP3R 31337

  • Members
  • 154 posts
  • Location:MI, USA

Posted 28 October 2008 - 05:11 PM

Running my own dns server is not an option for me, however, I will try your other suggestions later. Thanks

#11 Lynk

Lynk

    the 0ne

  • Members
  • 1 posts

Posted 05 May 2009 - 02:26 PM

I ran into this same problem, and found a rather silly solution. PKG_ADD can't handle the trailing slash properly. Just remove it, and everything should run smoothly.

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!