简体   繁体   English

cargo build-bpf 在 ubuntu 上失败

[英]cargo build-bpf fails on ubuntu

rustc --version = rustc 1.60.0 (7737e0b5c 2022-04-04) rustc --version = rustc 1.60.0 (7737e0b5c 2022-04-04)

solana --version = solana-cli 1.10.8 (src:623ac656; feat:1122441720) solana --version = solana-cli 1.10.8 (src:623ac656; 壮举:1122441720)

npm --version = 8.5.1 npm --version = 8.5.1

node --version = v12.22.9节点 --version = v12.22.9

os: ubuntu 22.04 lts操作系统:ubuntu 22.04 lts

after i run: " npm run build:program-rust " i am getting this error.在我运行:“ npm run build:program-rust ”之后,我收到了这个错误。

/home/[user]/.rustup/toolchains/bpf/bin/cargo: error while loading shared libraries:libssl.so.1.1: cannot open shared object file: No such file or directory /home/[user]/.rustup/toolchains/bpf/bin/cargo:加载共享库时出错:libssl.so.1.1:无法打开共享对象文件:没有这样的文件或目录

same problem with anchor.锚也有同样的问题。 在此处输入图像描述

i have located libssl0.1.1 there will it help me?我已经找到了 libssl0.1.1 对我有帮助吗? 在此处输入图像描述

Even though you have the shared object on your system, cargo build-bpf is probably not finding it since it isn't in a standard path.即使您的系统上有共享对象, cargo build-bpf也可能找不到它,因为它不在标准路径中。 You can try the solutions at How to I tell Rust where to look for a static library?您可以尝试如何告诉 Rust 去哪里寻找静态库? to tell the linker where to find the library.告诉链接器在哪里可以找到库。

yes, cargo wasn't in a standard path.是的,货物不在标准路径上。 and fixed everything by reinstalling Linux.并通过重新安装 Linux 修复了所有问题。 it was Ubuntu for testing.它是用于测试的 Ubuntu。 actually moved to Debian reinstalled packages and working properly.实际上转移到Debian重新安装了软件包并正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM