【问题标题】:Installing Node Red OPC UA Server fails on Ubuntu 20.04 running on Raspberry Pi 4在 Raspberry Pi 4 上运行的 Ubuntu 20.04 上安装 Node Red OPC UA 服务器失败
【发布时间】:2020-12-13 08:26:59
【问题描述】:

我正在尝试在运行在 RPi 4 上的 Ubuntu 20.04 中运行的 Node Red 中安装 node-red-contrib-opcua-server 节点。 失败了几次。

我已运行更新/升级并确保已安装 nodejs。 我尝试使用命令行和 Node Red GUI 安装此节点。

以下是上次安装尝试的记录信息。 记录的信息对我来说意义不大,所以我希望那里的 Linux 专家可以阐明成功安装此组件所需的内容。

2020-08-24T16:30:34.369Z Install : node-red-contrib-opcua-server 0.4.1

2020-08-24T16:30:34.445Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production node-red-contrib-opcua-server@0.4.1 
2020-08-24T16:30:49.312Z [out]  
2020-08-24T16:30:49.312Z [out] > deasync@0.1.20 install /home/mikeallgood/.node-red/node_modules/deasync 
2020-08-24T16:30:49.312Z [out] > node ./build.js 
2020-08-24T16:30:49.312Z [out]  
2020-08-24T16:30:52.039Z [err] gyp ERR! 2020-08-24T16:30:52.042Z [err]  build error  
2020-08-24T16:30:52.042Z [err] gyp 
2020-08-24T16:30:52.044Z [err]  ERR! stack Error: not found: make 
2020-08-24T16:30:52.044Z [err] gyp ERR! stack 
2020-08-24T16:30:52.045Z [err]      at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2020-08-24T16:30:52.045Z [err] gyp ERR! stack     
 at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2020-08-24T16:30:52.045Z [err] gyp ERR! stack     
 at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2020-08-24T16:30:52.045Z [err] gyp ERR! stack     
 at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16 
2020-08-24T16:30:52.045Z [err] gyp ERR! stack     
 at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2020-08-24T16:30:52.045Z [err] gyp ERR! stack     
 at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2020-08-24T16:30:52.045Z [err] gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:168:21)
2020-08-24T16:30:52.047Z [err] gyp ERR! System Linux 5.4.0-1015-raspi
2020-08-24T16:30:52.047Z [err] gyp ERR! 2020-08-24T16:30:52.047Z [err]  command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
2020-08-24T16:30:52.047Z [err] gyp ERR! cwd /home/mikeallgood/.node-red/node_modules/deasync 
2020-08-24T16:30:52.047Z [err] gyp ERR! node -v     
2020-08-24T16:30:52.048Z [err]  v12.18.3 
2020-08-24T16:30:52.048Z [err] gyp ERR! node-gyp -v v5.1.0 
2020-08-24T16:30:52.048Z [err] gyp ERR! not ok  
2020-08-24T16:30:52.065Z [err] Build failed 
2020-08-24T16:30:53.421Z [err] npm 
2020-08-24T16:30:53.422Z [err]  WARN node-red-project@0.0.1 No repository field. 2020-08-24T16:30:53.464Z [err] npm 
2020-08-24T16:30:53.464Z [err]  WARN node-red-project@0.0.1 No license field. 
2020-08-24T16:30:53.465Z [err]  
2020-08-24T16:30:53.533Z [err] npm 
2020-08-24T16:30:53.533Z [err]  ERR! code ELIFECYCLE 
2020-08-24T16:30:53.533Z [err] npm ERR! errno 1 
2020-08-24T16:30:53.543Z [err] npm  
2020-08-24T16:30:53.543Z [err] ERR! deasync@0.1.20 install: `node ./build.js` 
2020-08-24T16:30:53.543Z [err] npm ERR! Exit status 1 
2020-08-24T16:30:53.543Z [err] npm ERR!
2020-08-24T16:30:53.543Z [err] npm ERR! Failed at the deasync@0.1.20 install script. 
2020-08-24T16:30:53.543Z [err] npm  
2020-08-24T16:30:53.544Z [err] ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-08-24T16:30:53.580Z [err]  
2020-08-24T16:30:53.581Z [err] npm ERR! A complete log of this run can be found in: 
2020-08-24T16:30:53.581Z [err] npm ERR! 
2020-08-24T16:30:53.581Z [err]      /home/mikeallgood/.npm/_logs/2020-08-24T16_30_53_549Z-debug.log 
2020-08-24T16:30:53.638Z rc=1

【问题讨论】:

    标签: ubuntu node-red raspberry-pi4


    【解决方案1】:

    您似乎缺少构建您尝试安装的 npmjs 模块的本机组件所需的基本构建工具(例如 make)。

    您可能需要运行以下命令:

    sudo apt-get install build-essential
    

    【讨论】:

    • 感谢 hardillb!谈到 Linux,我是绿色的,这就是我摆弄这个项目的原因。您的帮助是无价的。
    猜你喜欢
    • 2020-08-13
    • 1970-01-01
    • 1970-01-01
    • 2016-03-05
    • 2020-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多