isaacs/npm — Issue #1757: Unable to install on FreeBSD 8.2 - /usr/bin/tar error
Author: drewgillson
Created: 2011-11-22 23:46:11+00:00
State: open

Attempting the one-line install returns:

> curl http://npmjs.org/install.sh | sh
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 100 7184 100 7184 0 0 29092 0 --:--:-- --:--:-- --:--:-- 233k
> tar=/usr/bin/tar
> version:
> tar (GNU tar) 1.23
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later .
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.

> Written by John Gilmore and Jay Fenlason.
> fetching: http://registry.npmjs.org/npm/-/npm-1.0.106.tgz
> gzip: (stdin): trailing garbage ignored
> /usr/bin/tar: Child returned status 1
> /usr/bin/tar: Error is not recoverable: exiting now
> It failed

tar -- version returns:

> tar (GNU tar) 1.23
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later .
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.

> Written by John Gilmore and Jay Fenlason.

Cloning from git and running make install returns:

> scripts/doc-build.sh man/man1/README.1
> scripts/doc-build.sh:No such file or directory
> *** Error code 1

node cli.js install npm -gf returns:

> npm ERR! Failed unpacking
> /tmp/npm-1321296461886/1321296461886-0.08765299012884498/tmp.tgz
> npm ERR! couldn't unpack
> /tmp/npm-1321296461886/1321296461886-0.08765299012884498/tmp.tgz to
> /tmp/npm-1321296461886/1321296461886-0.08765299012884498/contents
> npm ERR! Error: `tar "-zmvxpf"
> "/tmp/npm-1321296461886/1321296461886-0.08765299012884498/tmp.tgz" "-o"`
> npm ERR! failed with 2
> npm ERR! at ChildProcess.
> (/usr/home/outthere/.npm/npm/1.0.105/package/lib/utils/tar.js:221:20)
> npm ERR! at ChildProcess.emit (events.js:67:17)
> npm ERR! at ChildProcess.onexit (child_process.js:192:12)
> npm ERR! Report this *entire* log at:
> npm ERR!
> npm ERR! or email it to:
> npm ERR!
> npm ERR!
> npm ERR! System FreeBSD 8.2-STABLE
> npm ERR! command "node"
> "/usr/home/outthere/.npm/npm/1.0.105/package/cli.js" "install" "npm" "-gf"
> npm ERR! cwd /usr/home/outthere/.npm/npm/1.0.105/package
> npm ERR! node -v v0.4.12
> npm ERR! npm -v 1.0.105
> npm ERR!
> npm ERR! Additional logging details can be found in:
> npm ERR! /usr/home/outthere/.npm/npm/1.0.105/package/npm-debug.log
> npm not ok

And in npm-debug.log, I see:

> silly tar err gzip: (stdin): trailing garbage ignored
> silly tar err tar: Child returned status 1
> silly tar err tar: Error is not recoverable: exiting now
> silly tar exit 2
> ERR! Failed unpacking
> /tmp/npm-1321296461886/1321296461886-0.08765299012884498/tmp.tgz
> ERR! couldn't unpack
> /tmp/npm-1321296461886/1321296461886-0.08765299012884498/tmp.tgz to
> /tmp/npm-1321296461886/1321296461886-0.08765299012884498/contents
> ERR! Error: `tar "-zmvxpf"
> ERR! failed with 2

Finally, my attempt at replacing gzip with the GNU version causes issues with the
scripts recompressing files.

Help?