Topic: And now, another problem - how to force tcp(4) download for pkg_add?

When I`ve downloaded pkgsrc tree

ftp ftp://ftp.NetBSD.org/pub/pkgsrc/pkgsrc-2008Q2/pkgsrc-2008Q2.tar.gz

I had

Trying 2001:4f8:4:7:230:48ff:fe31:43f2...
ftp: connect to address 2001:4f8:4:7:230:48ff:fe31:43f2: No route to host
Trying 204.152.190.13...
Connected to ftp.NetBSD.org.

But, when, after that, I tried

 pkg_add kde-3.5.9

it was only

ftp: connect to address 2001:4f8:4:7:230:48ff:fe31:43f2: No route to host
pkg_add: prompt failed - wrong dir?
pkg_add: ftp_start() failed
ftp: connect to address 2001:4f8:4:7:230:48ff:fe31:43f2: No route to host
pkg_add: prompt failed - wrong dir?

etc. It haven`t tried simple tcp at all. How can I disable (if I can) tcp6 for pkg_add?

Re: And now, another problem - how to force tcp(4) download for pkg_add?

Go here: http://www.netbsd.org/docs/pkgsrc/using.html
And have a look at the "4.1.2. Installing binary packages" section.
You have to set PKG_PATH before you can install remote packages.

FTP mirrors can be found here: http://www.netbsd.org/mirrors/#ftp

No need to disable tcp6.

Just ask if you need more help.

<wintellect> NetBSD users are smart enough to accept that there's no 3D support tongue

Re: And now, another problem - how to force tcp(4) download for pkg_add?

dynek wrote:

Go here: http://www.netbsd.org/docs/pkgsrc/using.html
And have a look at the "4.1.2. Installing binary packages" section.
You have to set PKG_PATH before you can install remote packages.

But, I did! That was exactly the page I`ve followed. In particular, I have followed this:

# PATH="/usr/pkg/sbin:$PATH"
# PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/OPSYS/ARCH/VERSIONS/All"
# export PATH PKG_PATH

Although now... I am in doubt about "$PATH". Maybe, instead of "$PATH", I should have put the string itself? But, if so - what string, which path?
And even when I was downloading the pkgsrc tree, at first it  tried to use tcp6. But, as soon as it saw that there was "no route to host", it turned to the simple tcp. Why it didn`t behave so later, too, when I wanted to pkg_add?  Maybe in PKG_PATH=etc. I should have specified something like "no tcp6"? But, how?

Last edited by tartaruga (2008-09-03 18:40:33)

Re: And now, another problem - how to force tcp(4) download for pkg_add?

what does the command echo $PKG_PATH output?

Re: And now, another problem - how to force tcp(4) download for pkg_add?

asemisldkfj wrote:

what does the command echo $PKG_PATH output?

echo $PKG_PATH
ftp://ftp.NetBSD.org/pub/pkgsrc/packages/OPSYS/ARCH/VERSIONS/All

Re: And now, another problem - how to force tcp(4) download for pkg_add?

tartaruga wrote:
asemisldkfj wrote:

what does the command echo $PKG_PATH output?

echo $PKG_PATH
ftp://ftp.NetBSD.org/pub/pkgsrc/packages/OPSYS/ARCH/VERSIONS/All

I don`t know whether it`s normal, but, it gets lost after every reboot.

Re: And now, another problem - how to force tcp(4) download for pkg_add?

you have to change "OPSYS", "ARCH", and "VERSIONS" to the appropriate values.

if you're running NetBSD 4.0 on the x86 architecture your PKG_PATH variable should be something like

ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/4.0_2008Q2/All

Re: And now, another problem - how to force tcp(4) download for pkg_add?

Yup that's the problem. You have to change those vars in uppercase.

I do not advise using prebuilt packages (maybe some people will say the opposite though big_smile)
I've built a USB stick using a stable version of NetBSD and had a suprise. Xorg does not exist as prebuilt package(s).

With nowadays computers building your own packages using pkgsrc doesn't take that much time and makes you feel powerful smile

<wintellect> NetBSD users are smart enough to accept that there's no 3D support tongue

Re: And now, another problem - how to force tcp(4) download for pkg_add?

asemisldkfj wrote:

you have to change "OPSYS", "ARCH", and "VERSIONS" to the appropriate values.

if you're running NetBSD 4.0 on the x86 architecture your PKG_PATH variable should be something like

ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/4.0_2008Q2/All

Ups! You should have said what you have thought - "you, idiot!" smile
Off course, it`s working now. Thanks!

Re: And now, another problem - how to force tcp(4) download for pkg_add?

glad to have helped smile.