In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to install nodejs and phonegap on the second generation B version of raspberry pie. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Download Nodejs
Create a new directory to store the downloaded Nodejs files, where we create a 'nodes_download' directory.
Note * check the latest version through http://nodejs.org/dist.
Not all the latest versions of NodeJS can be used on raspberry pie because some do not specify ARM's instruction set correctly.
The second generation of raspberry pie can be used normally. I tested it myself and shared the process as follows.
Note: the raspberry generation uses version 0.12 of nodejs because it is the CPU of the ARM V6 instruction set, but the latest version of the Chriumun V8 JavaScript engine may use some ARM v7 features, such as memory protection.
Download and extract the 'tar' package:
Wget http://nodejs.org/dist/v0.12.1/node-v0.12.1.tar.gztar vxf node-v0.12.1.tar.gzcd node-v0.12.1 compiles Nodejs
Once the source code is downloaded, it can take hours to compile, so please be patient.
Note * previous versions only took more than ten minutes to compile, but as the Chriumun V8 engine becomes more complex and takes longer, it should be due to the addition of more and more support for ECMAScript 6. If you want to improve the speed of compilation, you can find the node.js0.8x version to compile.
Use the following command to compile Nodejs
Cd node-v0.12.1./configuremake installs compiled Nodejs code
Once the compilation is completed, it can be installed into the raspberry pie system. This requires the use of a system administrator to log in to the system, such as the su command.
Sudo make install
Restart raspberry pie
Sudo shutdown-r now
Check the installation
Once the installation is complete, you can check the version using the following command:
Node-vnpm-v
The display result should be:
Nodejs Version V0.12.1
NPM Version 2.5.1
If the results are normal, then the installation of Nodejs and NPM is complete.
Want to use npm install phonegap-g, install phonegap, sometimes network slow error, just a few more times.
Start the phonegap service
Start the Phonegap service first:
Phonegap create my-appcd my-appphonegap serve
Then go to Iphone or Android's phone, download and install phonegap developer app, and type:
192.168.1.10 IP 3000 # change the IP address to your own. Raspberry pie can check the IP address using Raspberry. 3000 is the default port.
Or download phonegap desktop app, which can be used on Mac OS X and Windows. The connection method is the same as above.
Currently, there is no client for raspberry pie, so it won't work with phonegap run.
This is the end of the article on "how to install nodejs and phonegap on Raspberry Pie version 2 B". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.