µWebSockets 编译失败,并且没有预编译的二进制文件 - Raspberry Pi

问题描述

我目前正在尝试在使用 uws 的 Raspberry Pi 上运行 node.js 应用程序。但是,在使用 uws 安装 npm install uws 后,我收到以下错误消息:

            throw new Error('Compilation of µWebSockets has failed and there is no pre-compiled binary ' +
            ^

Error: Compilation of µWebSockets has failed and there is no pre-compiled binary available for your system. Please install a supported C++11 compiler and reinstall the module 'uws'.
    at /home/pi/visio/node_modules/uws/uws.js:38:19
    at Object.<anonymous> (/home/pi/visio/node_modules/uws/uws.js:42:3)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/home/pi/visio/index.js:5:18)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)

我的 NodeJS 版本:v15.5.0

我的 NPM 版本:7.3.0

我尝试了 sudo apt update && sudo apt upgrade 没有成功。我有 gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1) 应该有 C++11 支持。

有人遇到过类似的问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)