isaacs/npm — Issue #1631: Install error on SmartMachine
Author: fjakobs
Created: 2011-10-31 10:24:13+00:00
State: open

I have trouble installing npm on one of our smart machines. I always get:

```
[ ~]$ curl http://npmjs.org/install.sh | TAR=gtar sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7149 100 7149 0 0 87428 0 --:--:-- --:--:-- --:--:-- 129k
fetching: http://registry.npmjs.org/npm/-/npm-1.0.102.tgz
0.4.12
1.0.102
cleanup prefix=/opt/local
altprefix=/usr/local

All clean!
npm ERR! Failed unpacking /tmp/npm-1320056422530/1320056422530-0.8592021558433771/tmp.tgz
npm ERR! couldn't unpack /tmp/npm-1320056422530/1320056422530-0.8592021558433771/tmp.tgz to /tmp/npm-1320056422530/1320056422530-0.8592021558433771/contents
npm ERR! Could not install: .
npm ERR! Error: `tar "-zmvxpf" "/tmp/npm-1320056422530/1320056422530-0.8592021558433771/tmp.tgz" "-o"`
npm ERR! failed with 1
npm ERR! at ChildProcess. (/tmp/npm.4749/package/lib/utils/tar.js:219: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 SunOS 5.11
npm ERR! command "/opt/local/bin/node" "/tmp/npm.4749/package/cli.js" "install" "-gf"
npm ERR! cwd /tmp/npm.4749/package
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.102
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/npm.4749/package/npm-debug.log
npm not ok
It failed
```

running the shell script with sudo `curl http://npmjs.org/install.sh | sudo TAR=gtar sh` gives the same error. Afterwards I checked out the git version and tried to install using `sudo node cli.js install -g -f` but got exactly the same error.

Any ideas what is going wrong and more importantly how I can get npm installed? Is there a manual way to install npm?