Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPM install issues Ubuntu 11.04 [closed]

installing a fresh node with the following commands

sudo apt-get install git-core curl build-essential openssl libssl-dev
git clone https://github.com/joyent/node.git && cd node
./configure 
make
make install
node -v
v0.5.0-pre

works without a glitch. When I try to install NPM i get:

>/tmp/node$ curl http://npmjs.org/install.sh | sudo sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3874  100  3874    0     0   3033      0  0:00:01  0:00:01 --:--:-- 22923
fetching: 

gzip: stdin: unexpected end of file
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
It failed
>

I am using a VirtualBox NAT networking with no special proxy / firewall in the way.

trying curl -s -L http://registry.npmjs.org/npm/latest i get {"error":"ucs","reason":"{bad_utf8_character_code}"}
which could hint to a problem on the NPM side??

Ralf

like image 723
Ralf Sigmund Avatar asked Jun 17 '11 08:06

Ralf Sigmund


People also ask

Why npm install failed?

code 1 error usually occurs when you run the npm install command. This cause of this error is that one of the dependencies you define in your package. json file fails to be installed properly on your computer. This means that npm fails to install the node-sass module that's added as a dependency to the n-app project.

How do I force an npm package to install?

Run npm update -g npm. Execute this command by running the command prompt as Administrator npm install -g windows-build-tools. Run npm install inside the project folder where the package. json file is located, if it doesn't work run: npm install --force.


1 Answers

Try this:

git clone http://github.com/isaacs/npm.git
cd npm
sudo make install
like image 141
Pengő Dzsó Avatar answered Sep 23 '22 16:09

Pengő Dzsó