Install nodejs in centos5.4 (error FPU = 'vfpv3' if armv7 else 'vfpv2)

Source: Internet
Author: User

1. Download nodejs
Wget http://nodejs.org/dist/v0.10.10/node-v0.10.10.tar.gz

2. Upgrade centos 5.6 64-bit python to 2.7.3
The reason is that the Python version of centos 5.6 is 2.4.3, however, currently, many Python-based application software require python versions higher than 2.4 (for example, iotop, nodejs, and func require python versions at least 2.6)

Wget-C

Http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2

Tar jxvf Python-2.7.3.tar.bz2
CD Python-2.7.3
 
./Configure
Make & make install
 
After python2.7 is installed, the default path is/usr/local/lib/python2.7.
View the Python version:
/Usr/local/bin/python2.7-V

Note:
Under normal circumstances, even if python2.7 is successfully installed, the Python version to which the system points is still 2.4.3 by default. Considering that Yum is based on python2.4.3, it can work normally and cannot be uninstalled easily. How can we point the default Python version to 2.7?
3. If you do not install Python 2.6 or later, an error will occur:
[Root @ localhost nodejs] # cd node-v0.10.10
[Root @ localhost node-v0.10.10] #./configure
File "./configure", line 434
FPU = 'vfpv3' if armv7 else 'vfpv2'
^
Syntaxerror: Invalid Syntax

4. Compile and install nodejs
Tar zxvf node-v0.10.0.tar.gz
CD node-v0.10.0
./Configure
Make
Report errors during make:
Import bz2 importerror: No module named bz2 error, which indicates that bz2 is missing
Install bz2
Yum-y install Bzip2 *
Go to the python directory, compile Python again, and then install nodejs

Then execute
CD node-v0.10.0
./Configure
Make
Make install

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.