Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

curl http://npmjs.org/install.sh | sh #1540

Closed
sothye98 opened this issue Oct 12, 2011 · 10 comments
Closed

curl http://npmjs.org/install.sh | sh #1540

sothye98 opened this issue Oct 12, 2011 · 10 comments

Comments

@sothye98
Copy link

Hi!

When I run above command I got the follwong error:

Could not create /usr/local/lib/node_modules/___npm.npm
npm ERR! error installing npm@1.0.94 Error: EACCES, Permission denied '/usr/local/lib/node_modules'
npm ERR! Error: EACCES, Permission denied '/usr/local/lib/node_modules'
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Linux 2.6.38-8-generic
npm ERR! command "node" "/tmp/npm.2841/package/cli.js" "install" "-g" "-f"
npm ERR! cwd /tmp/npm.2841/package
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.94
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/npm.2841/package/npm-debug.log
npm not ok
make: *** [install] Error 1
npm ERR! Could not create /usr/local/lib/node_modules/___npm.npm
npm ERR! error installing npm@1.0.94 Error: EACCES, Permission denied '/usr/local/lib/node_modules'
npm ERR! Error: EACCES, Permission denied '/usr/local/lib/node_modules'
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Linux 2.6.38-8-generic
npm ERR! command "/usr/local/bin/node" "/tmp/npm.2841/package/cli.js" "install" "-gf"
npm ERR! cwd /tmp/npm.2841/package
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.94
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES

But When I run
curl http://npmjs.org/install.sh | sudo sh

I got nothing. Can you where is the mistake?

Thanks

@isaacs
Copy link
Contributor

isaacs commented Oct 12, 2011

Try this:

curl http://npmjs.org/install.sh | sudo npm_debug=1 bash

You will definitely get something

@isaacs isaacs closed this as completed Oct 12, 2011
@sothye98
Copy link
Author

Thanks Isaacs. But when I run I get an error:

  • cd /tmp/npm.2605
  • /bin/tar -xzf -
  • curl -SsL --cacert /tmp/npm.2605/cafile.crt ''

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now

  • ret=2
  • '[' 2 -ne 0 ']'
  • echo 'It failed'
    It failed
  • exit 2

It seems script has problem, not getting the npm tar.
But I manually downloaded the latest version (1.0.94).
I am able to install. when I run node -v? I got the version number.
But I install the package such as npm install socket.io or npm install express,
I am getting an error.

Error: ECONNREFUSED, Connection refused
npm ERR! at Socket._onConnect (net.js:595:18)
npm ERR! at IOWatcher.onWritable as callback
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Linux 2.6.38-8-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /home/siva
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.94
npm ERR! code ECONNREFUSED
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/siva/npm-debug.log

What do you think? installion of NPM is not good or some other problems?

Thanks again.

@isaacs
Copy link
Contributor

isaacs commented Oct 13, 2011

Let's start at the beginning.

The install.sh file appears to not be getting the url for the npm tarball. Someone had this problem yesterday and we fixed it. What does this command output:

(curl -SsL -k https://registry.npmjs.org/npm/latest; echo "") | sed -e 's/^.*tarball":"//' | sed -e 's/".*$//'

@sothye98
Copy link
Author

@sothye98
Copy link
Author

I downloaded using wget http://registry.npmjs.org/npm/-/npm-1.0.96.tgz.
Then untar it? It is avaiable in package folder.
I reinstalled npm 1.0.96.

But I couldnt install pakcge using npm.

$npm install socket.io

npm ERR! Error: ECONNREFUSED, Connection refused
npm ERR! at Socket._onConnect (net.js:595:18)
npm ERR! at IOWatcher.onWritable as callback
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Linux 2.6.38-8-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /home/siva/Downloads/package
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.96
npm ERR! code ECONNREFUSED
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/siva/Downloads/package/npm-debug.log
npm not ok

@isaacs
Copy link
Contributor

isaacs commented Oct 14, 2011

Ok, so the error is that node programs can't reach the outside network, even though wget can.

What's in your /etc/resolv.conf file?

@sothye98
Copy link
Author

It points to name server. Do I need to add the name server of someone else?
Problems with install.sh is continue if I use curl http://npmjs.org/install.sh | sudo bash

version 1.0.99 of NPM is also not install any packages (socket.io) even I manaually install.

@sothye98
Copy link
Author

Error I am getting from manual installion of 1;0;99 >>>

npm install socket.io
npm ERR! Error: ETIMEDOUT, Connection timed out
npm ERR! at Socket._onConnect (net.js:595:18)
npm ERR! at IOWatcher.onWritable as callback
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Linux 2.6.38-8-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /home/siva/Downloads/package
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.99
npm ERR! code ETIMEDOUT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/siva/Downloads/package/npm-debug.log
npm not ok

1 similar comment
@sothye98
Copy link
Author

Error I am getting from manual installion of 1;0;99 >>>

npm install socket.io
npm ERR! Error: ETIMEDOUT, Connection timed out
npm ERR! at Socket._onConnect (net.js:595:18)
npm ERR! at IOWatcher.onWritable as callback
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Linux 2.6.38-8-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /home/siva/Downloads/package
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.99
npm ERR! code ETIMEDOUT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/siva/Downloads/package/npm-debug.log
npm not ok

@couleurs
Copy link

couleurs commented Nov 9, 2011

Try running curl http://npmjs.org/install.sh | sudo sh instead of curl http://npmjs.org/install.sh | sh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants