![Lubuntu 18.04:“符号查找错误:未定义符号:SSL_library_init”](https://linux22.com/image/1063971/Lubuntu%2018.04%EF%BC%9A%E2%80%9C%E7%AC%A6%E5%8F%B7%E6%9F%A5%E6%89%BE%E9%94%99%E8%AF%AF%EF%BC%9A%E6%9C%AA%E5%AE%9A%E4%B9%89%E7%AC%A6%E5%8F%B7%EF%BC%9ASSL_library_init%E2%80%9D.png)
我正在尝试运行一个脚本来初始化 Firebase 连接,然后对新集合进行测试写入/读取。在 Node.js 8.10.0 上运行该脚本时,我收到此错误:
node: symbol lookup error: /home/owner/PhpstormProjects/folder_name/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node: undefined symbol: SSL_library_init
以下是代码:
const firebase_admin = require("firebase-admin");
const firebase_service_account = require("../project_name-firebase-admin-xyz");
firebase_admin.initializeApp({
credential: firebase_admin.credential.cert(firebase_service_account)
});
const firestore = firebase_admin.firestore();
console.log("line 11");
let docRef = firestore.collection("test").doc("alovelace");
let setAda = docRef.set({ first : "Ada" });
console.log("line 17");
输出:
owner@G700:~/PhpstormProjects/project_folder$ node ./gitignore/scratch_area/firebase_1a_minimal.js
line 11
line 17
node: symbol lookup error: /home/owner/PhpstormProjects/project_folder/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node: undefined symbol: SSL_library_init
我尝试删除let setAda = docRef.set({ first : "Ada" });
。这可以避免出现错误消息。
这似乎是在设置新记录时出现的问题,无论是在 Firestore 端,还是在 SSL/gRPC/Node.js/Lubuntu 上。我相信我的机器是最有可能的问题。以下是相关软件:
- Node.js 8.10.04
- Lubuntu 18.04
我很感谢任何反馈,谢谢。