Tag: debian

node:在Debian上找不到的命令

所以,我正在做一个mac和web服务器,我已经安装了Debian 8。 不过,我目前正在大部分时间在本地主机上开发一个节点应用程序,在这里一切正常 – 我可以毫无问题地使用node index.js 。 不过,我通过node.js网站的build议在我的networking服务器上安装了节点,这是… sudo apt-get install -y nodejs 没有抛出任何错误 之后,我可以使用npm命令。 但是,当我尝试执行node index.js ,我收到bash: node: command not found 。 此外,节点未安装在我的/usr/local/bin文件夹中。 所以我甚至不能通过这里推荐的/usr/local/bin/node 来运行 。 那么我究竟做错了什么? 我现在很困惑,真的不知道如何解决这个问题。

警告:PhantomJS找不到

我在Debian 6上安装了nodejs 0.10.15。然后我安装了npm: sudo npm install grunt-cli -g 我也执行了npm install在我的本地testing目录(下载必要的依赖到node_modules目录),它包含下面的package.json文件: { "name": "sample-name", "version": "1.4.0", "devDependencies": { "grunt": "~0.4.1", "grunt-contrib-qunit": ">0.0.0", "grunt-qunit-istanbul": ">0.0.0" } } 这里是安装phantomjs时的输出: … Writing location.js file Done. Phantomjs binary available at /home/myuser/Test/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs Done. Phantomjs binary available at /home/myuser/Test/node_modules/grunt-qunit-istanbul/node_modules/grunt-lib-phantomjs-istanbul/node_modules/phantomjs/lib/phantom/bin/phantomjs grunt@0.4.1 node_modules/grunt ├── which@1.0.5 … 但是当我从testing目录运行grunttesting时 ,我得到: Running PhantomJS…ERROR >> In order for […]

树莓派,Arduino,Node.js和串口

我试图从一个node.js服务器脚本与我的arduino谈话。 这是我的代码: var app = require('express')() , server = require('http').createServer(app) , io = require('socket.io').listen(server) , SerialPort = require('serialport').SerialPort; //SERIAL var portName = '/dev/ttyACM0'; var sp = new SerialPort(); // instantiate the serial port. sp.open(portName, { // portName is instatiated to be COM3, replace as necessary baudRate: 115200, // this is synced to what was set […]

在树莓派2上安装node.js

我已经在Raspberry Pi 2上安装了Raspbian,现在我正在尝试在其上安装node.js,但是我遇到了一个问题。 我按照指示input了这些命令到terminal wget http://node-arm.herokuapp.com/node_latest_armhf.deb sudo dpkg -i node_latest_armhf.deb 但是当我检查使用的节点的版本 node -v 我得到这个错误: node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node) node: /lib/arm-linus-gnueabihf/libc.so.6: version `GLIBC_2.16' not found (required by node) 我是使用覆盆子pi相当新,所以任何帮助解决这个问题将是伟大的!

用node.js(childProcess)运行shell脚本

我想在我的node.js服务器上运行一个shell脚本,但没有发生任何事情… childProcess.exec('~/./play.sh /media/external/' + req.params.movie, function() {}); //not working 另一个subprocess工作完美,但上面的过程不会。 childProcess.exec('ls /media/external/', movieCallback); //works 如果我在terminal运行脚本,那么它的工作原理。 有任何想法吗? (chmod + x设置)