在temux中,我在端口8083节点上运行。
在ubuntu中,我在package.json中使用了以下脚本:
但在termux中,它不起作用。
"kill": `"kill $(lsof -t -i:8083)"`我知道这是个错误
sh: 1: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
kill -l [exitstatus]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! radio@1.0.0 kill: `kill $(lsof -t -i:8083)`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the radio@1.0.0 kill script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2020-07-15T12_44_45_322Z-debug.log和两个变体
"kill":"fuser -k 8083/tcp && echo 'Terminated‘|| echo’端口上没有运行任何东西‘“
radio@1.0.0 kill2 /data/data/com.termux/files/home/server-radio
> fuser -k 8083/tcp && echo 'Terminated' || echo 'Nothing was running on the PORT'
Cannot open protocol file "/proc/net/tcp": Permission denied
Nothing was running on the PORT发布于 2020-07-15 21:30:51
尝尝这个
kill -9 $(lsof -t -i:8083 -sTCP:LISTEN)或者尝试使用sudo
sudo kill -9 $(lsof -t -i:8083 -sTCP:LISTEN)https://stackoverflow.com/questions/62915444
复制相似问题