Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

problem with pkg_add

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> SFU / Interix - Getting Started >> problem with pkg_add Page: [1] 2   next >   >>
Login
Message << Older Topic   Newer Topic >>
problem with pkg_add - Oct. 18, '05, 9:53:05 PM   
jluis

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
Hi,
I just installed SFU in a new machine and tried to procede to do updates, but I'm facing strange problems.
Shortly, if I do for example
pkg_add ftp://ftp.interopsystems.com/pkgs/3.5/automake-current-bin.tgz
I get:

tar: End of archive volume 1 reached
tar: Sorry, unable to determine archive format.
pkg_add(automake-current-bin): URL `ftp://ftp.interopsystems.com/pkgs/3.5/automa
ke-current-bin.tgz' has unknown hostname part!
pkg_add(automake-current-bin): unable to fetch `ftp://ftp.interopsystems.com/pkg
s/3.5/automake-current-bin.tgz' by URL

There two strange things here:
1. first tar is not able to determine archive format
I checked that by downloading the file an running local a
tar tvf automake-current-bin.tgz
tar: Cannot identify format. Searching...
tar: Cpio file name length 22156 is out of range
tar: Invalid header, starting valid header search.
tar: Cpio file name length 50986 is out of range
tar: Cpio file name length 37726 is out of range
...

2. ftp is not able to connect to interopsystem (but it is to my anonymous ftp)
More, this is the second attempt. Meanwhile I have reinstalled SFU and before
running the command
sh pkg-current-bin35.sh
I verified the a the connection was possible

So it seams that both ftp and tar are somewhat broken after running the
pkg-current-bin35.sh script.

Any clues?

Thanks
Post #: 1
RE: problem with pkg_add: another instance - Oct. 19, '05, 4:03:47 AM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
Hi, I got the same problem, and add my request for clarification:

$ echo $PKG_PATH
ftp://ftp.interopsystems.com/pkgs/3.5
$ pkg_add ls-current-bin.tgz

gzip: stdin: unexpected end of file
tar: End of archive volume 1 reached
tar: Sorry, unable to determine archive format.
pkg_add(ls-current-bin): URL `ftp://ftp.interopsystems.com/pkgs/3.5/ls-current-bin.tgz' has unknown hostname part!
pkg_add(ls-current-bin): unable to fetch `ftp://ftp.interopsystems.com/pkgs/3.5/ls-current-bin.tgz' by URL
$

_____________________________

John Benson

(in reply to jluis)
Post #: 2
RE: problem with pkg_add: more data - Oct. 19, '05, 4:10:21 AM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
The following shows that the problem persists even though I can ping interopsystems; also, that the initial ftp:// seems to be optional and doesn't affect the problematic outcome:

$ ping ftp.interopsystems.com
PING ftp.interopsystems.com (64.235.106.194): 56 data bytes
64 bytes from 64.235.106.194: icmp_seq=0 ttl=242 time=80.115 ms
64 bytes from 64.235.106.194: icmp_seq=1 ttl=242 time=90.13 ms
64 bytes from 64.235.106.194: icmp_seq=2 ttl=242 time=90.13 ms
^C
--- ftp.interopsystems.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 80.115/86.791/90.13 ms
$ pkg_add ls-current-bin.tgz

gzip: stdin: unexpected end of file
tar: End of archive volume 1 reached
tar: Sorry, unable to determine archive format.
pkg_add(ls-current-bin): URL `ftp://ftp.interopsystems.com/pkgs/3.5/ls-current-bin.tgz' has unknown hostname part!
pkg_add(ls-current-bin): unable to fetch `ftp://ftp.interopsystems.com/pkgs/3.5/ls-current-bin.tgz' by URL
$ pkg_add ftp.interopsystems.com/pkgs/3.5/ls-current-bin.tgz

gzip: stdin: unexpected end of file
tar: End of archive volume 1 reached
tar: Sorry, unable to determine archive format.
pkg_add(ls-current-bin): URL `ftp://ftp.interopsystems.com/pkgs/3.5/ftp.interopsystems.com/pkgs/3.5/ls-current-bin.tgz' has
unknown hostname part!
pkg_add(ls-current-bin): unable to fetch `ftp://ftp.interopsystems.com/pkgs/3.5/ftp.interopsystems.com/pkgs/3.5/ls-current-b
in.tgz' by URL
$

_____________________________

John Benson

(in reply to jsbenson)
Post #: 3
RE: problem with pkg_add: whoops, my bad - Oct. 19, '05, 4:15:16 AM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
Sorry, I messed up on the test of whether you needed the ftp:// in front of the rest of the hostname. You do. It was being provided by PKG_PATH though I didn't notice it in the previous post.

_____________________________

John Benson

(in reply to jsbenson)
Post #: 4
RE: problem with pkg_add: whoops, my bad - Oct. 19, '05, 4:39:34 AM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
Starting with jluis first:
Tar isn't broken. Tar's error messages are appearing because no data is fed
to it from ftp (it's part of a pipeline). The ftp connection to the
the /Tools site requires a login and password. With your initial use of either
pkg_update or pkg_add you should have been asked and it would then
create a "$HOME/.netrc" file to save the info for future use.
Were you prompted for this or not?
Also what system are you using (Windows XP, 2000, ...) ?

With jsbenson:
The same couple of questions:
Were you prompted for the membername & password or not?
Also what system are you using (Windows XP, 2000, ...) ?

(in reply to jsbenson)
Post #: 5
RE: problem with pkg_add: whoops, my bad - Oct. 19, '05, 10:26:34 AM   
jluis

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
Rodney,
After my post (sorry, it should have been before) I did a more
careful search of related posts. I found then the DEP issue and
read the complicated page mentioned in the FAQ 2.07.

My machine has XP SP2 installed so I had to tun off the DEP.
It was not obvious to find how to do it, but finally I did it
For the record, at c: we have a Boot.ini file in which we have
to set /noexecute=AlwaysOff

After that the ftp connection still not working - complains about
not beeing able to recognize the host name. I repeat that after the
SFU installation ftp was perfectly able to connect. It lost
that ability after runing the pkg-current-bin35.sh

I also saw a post mentioning the the problem could be in the
etc/resolv.conf
Commenting all lines in that file made no difference.

However, I found a working solution.
because the ping to ftp.interopsystems.com worked and showed
the IP I tried using it and finally
pkg_add ftp://myname:my_passwd@64.235.106.194/pkgs/3.5/{package_to_add}

worked.

BUT, if I dowload a package and run tar tvf on it I still get
the errors mentioned in my first post, namelly
tar: Cannot identify format. Searching...
tar: Cpio file name length 22156 is out of range
tar: Invalid header, starting valid header search.
...

using cygwin's tar works perfectly.

J. Luis

(in reply to Rodney)
Post #: 6
RE: problem with pkg_add: whoops, my bad - Oct. 19, '05, 12:40:50 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
> My machine has XP SP2 installed so I had to tun off the DEP.

Okay. You did reboot after making this change, right?

> BUT, if I dowload a package and run tar tvf on it I still get

How are you starting up your shell ?

(in reply to jluis)
Post #: 7
RE: problem with pkg_add: whoops, my bad - Oct. 19, '05, 1:40:47 PM   
jluis

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
>> My machine has XP SP2 installed so I had to tun off the DEP.

>Okay. You did reboot after making this change, right?
Yep

>> BUT, if I dowload a package and run tar tvf on it I still get

> How are you starting up your shell ?

I use the icon created by the install, but I found out what is happening.
The tar version in SFU does not understand the "tvf" options when applyied
to a *.tgz file
Runing tar ztvf ...tgz works. I guess that I should install the gnu-tar

Thanks

(in reply to Rodney)
Post #: 8
RE: problem with pkg_add: whoops, my bad - Oct. 19, '05, 2:00:04 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
> Runing tar ztvf ...tgz works. I guess that I should install the gnu-tar

No. The packaging system works with /bin/tar only.
You can install gnu-tar still, but leave it in /usr/local/bin.
The gnu-tar will mess things up if it clobbers /bin/tar.

(in reply to jluis)
Post #: 9
RE: problem with pkg_add: whoops, my bad - Oct. 19, '05, 3:14:16 PM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
Yep, I created $HOME/.netrc and stuck in the user ID and password I use to log into the forums. Is there another ID/password combination I need to use instead?

_____________________________

John Benson

(in reply to Rodney)
Post #: 10
RE: problem with pkg_add: whoops, my bad - Oct. 19, '05, 3:15:09 PM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
Oh, and I'm using XP Pro. Gonna go look at DEP right now...

_____________________________

John Benson

(in reply to jsbenson)
Post #: 11
RE: problem with pkg_add: whoops, my bad - Oct. 19, '05, 3:29:16 PM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
pkg_add ftp://myname:my_passwd@64.235.106.194/pkgs/3.5/{package_to_add}

worked for me too. I'm going to experiment a little more...

_____________________________

John Benson

(in reply to jsbenson)
Post #: 12
RE: problem with pkg_add: whoops, my bad - Oct. 19, '05, 3:38:22 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
> Yep, I created $HOME/.netrc and stuck in the user ID and password I use to log into the forums. Is there another ID/password combination I need to use instead?

This is the correct user/password combination.
The "$HOME/.netrc" file needs to have mode 600 (rw-------) permissions on it for security.
Check if the mode is right.

(in reply to jsbenson)
Post #: 13
RE: problem with pkg_add: are spaces in the directory p... - Oct. 19, '05, 3:47:15 PM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
Here's another place where the problem shows up:

$ echo $HOME
/dev/fs/C/Documents and Settings/Filiberto/My Documents
$ ls $HOME
ls: /dev/fs/C/Documents: No such file or directory
ls: Documents: No such file or directory
ls: Settings/Filiberto/My: No such file or directory
ls: and: No such file or directory
$ echo "$HOME"
/dev/fs/C/Documents and Settings/Filiberto/My Documents
$ ftp ftp.interopsystems.com
ftp: ftp.interopsystems.com: Host name lookup failure
ftp>

<end quote>

I wonder if I'm getting bitten by the "don't want spaces in your directory path" problem. I'm wondering of the host lookup problem is really a problem resolving the problematic directory path to $HOME/.netrc

More later...

(in reply to jsbenson)
Post #: 14
RE: problem with pkg_add: spaces in the directory path ... - Oct. 19, '05, 4:13:01 PM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
I created a symlink in the SFU filesystem to "My Documents", set HOME to it, and can get to $HOME/.netrc without anybody other than the symlink knowing about the spacey Windows directories.

This does not, however, solve the host name lookup failure:

$ echo $HOME
/home/jsbenson
$ ls -l $HOME
lr--r--r-- 1 Filiberto +SYSTEM 55 Oct 19 13:01 /home/jsbenson -> /dev/fs/C/Documents and Settings/Filiberto/My Documents
$ cat $HOME/.netrc
machine ftp.interopsystems.com login jsbenson password MYPASSWORD
$ ftp ftp.interopsystems.com
ftp: ftp.interopsystems.com: Host name lookup failure
ftp> $
$

<end quote>

Any suggestions? My guess is that this is a .netrc, not a pkg_add and ftp problem...

(in reply to jsbenson)
Post #: 15
RE: problem with pkg_add: I've got the right mode on .n... - Oct. 19, '05, 4:17:06 PM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
.netrc is already secured as you suggested, so it's something else; thanks anyway

(in reply to Rodney)
Post #: 16
RE: problem with pkg_add: hardcoding user and password ... - Oct. 19, '05, 4:18:30 PM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
$ export PKG_PATH=ftp://jsbenson:MYPASSWORD@64.235.106.194/pkgs/3.5
$ echo $PKG_PATH
ftp://jsbenson:MYPASSWORD@64.235.106.194/pkgs/3.5
$ pkg_add expect-current-bin.tgz
Your HOME environment variable has a path with spaces in it.
This can cause problems for some applications. Please set a home directory for
this user in the user database without spaces. This really will make things
work better in the long term.

Your HOME environment variable has a path with spaces in it.
This can cause problems for some applications. Please set a home directory for
this user in the user database without spaces. This really will make things
work better in the long term.

Your HOME environment variable has a path with spaces in it.
This can cause problems for some applications. Please set a home directory for
this user in the user database without spaces. This really will make things
work better in the long term.

$ expect
expect1.1> ^C$
$

(in reply to jsbenson)
Post #: 17
RE: problem with pkg_add: hardcoding user and password ... - Oct. 19, '05, 4:37:54 PM   
jluis

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
I really think the problem is introduced by the pkg-current-bin35.sh script.
Either by the updated ftp that it installs (that's what the script says), or
some other settings.
I repeat that the ftp worked ok before runing the script.

(in reply to jsbenson)
Post #: 18
Bingo: gotta add ftp.interopsystems.com to the hosts file - Oct. 19, '05, 4:40:54 PM   
jsbenson

 

Posts: 13
Joined: Oct. 18, '05,
Status: offline
Here's the solution to the problem, but first how it works for FTP. Notice that the .netrc file is three lines, with the second and third tab-indented, though joining all three lines together without tabs also works:

$ cat /etc/hosts
...
64.235.106.194 ftp.interopsystems.com
$ echo $PKG_PATH
ftp://ftp.interopsystems.com/pkgs/3.5
$ cat .netrc
machine ftp.interopsystems.com
login jsbenson
password MYPASSWORD
$ ftp ftp.interopsystems.com
Connected to ftp.interopsystems.com.
220 ProFTPD 1.2.9 Server (Interop Systems FTP Server 1) [ftp.interopsystems.com]
331 Password required for jsbenson.
230 User jsbenson logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> 221 Goodbye.
$

And here's the final result we were looking for, the convenient pkg_add:

$ pkg_add expect-current-bin.tgz
pkg_add(expect-current-bin): package already recorded as installed
$

The question is, why did I have to add ftp.interopsystems.com to the /etc/hosts file to make this fly? I could ping ftp.interopsystems.com fine before adding it to the hosts file, so what gives?

(in reply to jsbenson)
Post #: 19
RE: Bingo: gotta add ftp.interopsystems.com to the host... - Oct. 19, '05, 6:15:55 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
The ftp that ships with SFU/Interix 3.5 is an earlier version. It's linked differently.
The version you have just installed is linked against a newer BIND library.
Functionality has been getting added to BIND for getting the information directly
from the registry rather than going through a slower path via WinSock.

That you had to add a hostname to the /etc/hosts file is odd.
Since you have a workaround for getting updates I would recommend updating ftp.
Then at least you will have the most recent version. The same for pkg.
There have been changes and updates since the versions you have were released.

A script built againt the most recent versions is to be available RSN.

(in reply to jsbenson)
Post #: 20
Page:   [1] 2   next >   >>
All Forums >> [SFU / Interix / SUA Technology] >> SFU / Interix - Getting Started >> problem with pkg_add Page: [1] 2   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.078