日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux停止nodejs,node.js – 在linux重启后,nodejs消失了

發布時間:2025/3/21 linux 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux停止nodejs,node.js – 在linux重启后,nodejs消失了 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我剛用安裝成功的nvm安裝了nodejs版本0.10.14.

在安裝nodejs之前,我安裝了zeromq 2.2.0版.

出于測試目的,我試圖在下面運行一個基本的pub示例.

var zmq = require('zmq');

var socket = zmq.socket('pub');

console.log("Binding socket on port 8800...");

socket.bind('tcp://localhost:8800', function(err){

if(err){

console.log(err)

} else{

console.log("listening on port 8800");

}

});

socket.send("hello this is testServer2 on port 8800...");

但這是投擲錯誤 –

events.js:72

throw er; // Unhandled 'error' event

^

TypeError: Socket is busy

at Socket._ioevents (/home/zishan/node_modules/zmq/lib/index.js:198:22)

at Socket._flush (/home/zishan/node_modules/zmq/lib/index.js:343:23)

at Socket.send (/home/zishan/node_modules/zmq/lib/index.js:318:42)

at Object. (/home/zishan/newsURLCollector/testServer2.js:16:8)

at Module._compile (module.js:456:26)

at Object.Module._extensions..js (module.js:474:10)

at Module.load (module.js:356:32)

at Function.Module._load (module.js:312:12)

at Function.Module.runMain (module.js:497:10)

at startup (node.js:119:16)

端口8800已經使用ufw打開了.

我試著谷歌搜索套接字繁忙的錯誤,但沒有運氣,我認為重新啟動Ubuntu是好的,問題變得更糟.當我重新登錄并嘗試再次運行上述示例時,系統會拋出消息:

zishan@news01:~/newsURLCollector$node testServer2.js

The program 'node' can be found in the following packages:

* node

* nodejs-legacy

Try: sudo apt-get install

為什么地球上的工作節點停止工作并且無法找到節點.然后我按照系統提示,并在下面做了sudo apt-get install節點的結果:

zishan@news01:~$sudo apt-get install node

[sudo] password for zishan:

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following package was automatically installed and is no longer required:

libpgm-5.1-0

Use 'apt-get autoremove' to remove it.

The following NEW packages will be installed

node

0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.

Need to get 0 B/1,284 B of archives.

After this operation, 38.9 kB of additional disk space will be used.

Selecting previously unselected package node.

(Reading database ... 66172 files and directories currently installed.)

Unpacking node (from .../node_0.3.2-7.4_all.deb) ...

Processing triggers for man-db ...

Setting up node (0.3.2-7.4) ...

zishan@news01:~$node -v

然后我試圖找到節點版本,但沒有發生任何事情,我現在沒有得到節點提示,但當我做“哪個節點”它說 – /usr/sbin / node

重啟后我不知道出了什么問題.任何人都可以解釋一下.

總結

以上是生活随笔為你收集整理的linux停止nodejs,node.js – 在linux重启后,nodejs消失了的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。