hokaccha / nodebrew

Node.js version manager
MIT License
1.06k stars 66 forks source link

When installing node.js, this program only use system python. #40

Closed yoshihirokuno closed 9 years ago

yoshihirokuno commented 9 years ago

System python in our server is 2.3.4. And I can't update it because I don't have sudo authorization. So instead of it, I'd like to use another python I install under my home directory but I can't. Please change code to install nodejs using local python. README.md in node.js source says like below

If your python binary is in a non-standard location or has a non-standard name, run the following instead:

export PYTHON=/path/to/python
$PYTHON ./configure
make
make install
hokaccha commented 9 years ago

You can use install-binary command instead of install command.

$ nodebrew install-binary stable

This command dose not require python.

yoshihirokuno commented 9 years ago

I've already tried that command. But after installing it, node -v outputted only floating-point error. I guess it's maybe because nodejs compiled from the binary run with system python. So I putted this issue.

hokaccha commented 9 years ago

hmm... Chould you try this commmands and show me logs?

$ nodebrew install-binary latest
$ nodebrew use latest
$ node -v
yoshihirokuno commented 9 years ago

$ nodebrew install-binary v0.12.7 $ nodebrew use v0.12.7 $ node -v floting-point error $ npm -v floating point error

What's the difference between your command? Are there any dependencies in linux modules? Could you try it with 2.3.4 system python? And also why can't you change install command to use local python? It seems to add new ENV for local python path...

hokaccha commented 9 years ago

Could you tell me your OS and version?

yoshihirokuno commented 9 years ago

It's maybe centos. But I can't tell you about that version soon. I use it in my company. I'll try to check os and version next week. Because I'm in vacation now. And if that would not be the python problem, I guess it maybe depends on gcc. I also need to check which cause this problem...

hokaccha commented 9 years ago

OK. For isolating the problem, try this operation.

  1. Download a binary file from https://nodejs.org/download/ (Maybe, Linux Binaries 32-bit or 64-bit)
  2. Extract the tarball
  3. Execute the node

For instance:

# You must choice 32-bit or 64-bit by your machine's CPU
$ wget https://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz
$ tar xvzf node-v0.12.7-linux-x64.tar.gz
$ ./node-v0.12.7-linux-x64/bin/node -v

If operation was failed, it's a node's problem instead of nodebrew's problem.

If operation was successful then try this operations.

$ nodebrew clean all
$ nodebrew uninstall v0.12.7
$ nodebrew install-binary v0.12.7
$ nodebrew use v0.12.7
$ node -v
yoshihirokuno commented 9 years ago

The operation you said failed because the gcc version in our server is lower than 4.2.X. It's 3.X.X... Sorry. So I close this issue.