我试图在电子应用程序中要求grpc,但我收到以下错误:
Error: dlopen(/srv/node_modules/grpc/src/node/extension_binary/grpc_node.node,1): Symbol not found: _GENERAL_NAME_free Referenced from: /srv/node_modules/grpc/src/node/extension_binary/grpc_node.node Expected in: flat namespace
我正在使用OSX Sierra 10.12.1,节点6.8.1,电子1.4.4和grpc 1.0.1-pre1.
我升级了xcode命令行工具并进行了brew安装openssl –force.
我建立了二进制文件:
LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include ./node_modules/.bin/electron-rebuild
并手动:
LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include HOME=~/.electron-gyp node-pre-gyp rebuild --target=1.4.4 --arch=x64 --dist-url=https://atom.io/download/atom-shell
但是当我运行应用程序时,我仍然得到错误.
解决方法
像这样重建grpc模块
npm install --save-dev electron-rebuild (On Mac & Linux) ./node_modules/.bin/electron-rebuild (On Windows) .\node_modules\.bin\electron-rebuild.cmd
这将重建GRPC,你很高兴.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。