错误:无法为“openssl v0.9.24”运行自定义构建命令

2024-04-10

我想安装cargo-apkcargo install cargo-apk到我的系统(Linux Mint),但我收到此错误

error: failed to run custom build command for `openssl v0.9.24`

Caused by:
  process didn't exit successfully: `/tmp/cargo-install7N44TO/release/build/openssl-65bb03053b1fc095/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Unable to detect OpenSSL version', /home/jiri/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.24/build.rs:16:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-apk v0.4.0`, intermediate artifacts can be found at `/tmp/cargo-install7N44TO`

Caused by:
  build failed

我发现我应该安装 libssl-dev,所以我就安装了,但没有帮助。


rust openssl-sys 库需要安装 openssl。

然后在 Windows 上: 首先从这里下载并安装它:http://slproweb.com/products/Win32OpenSSL.html http://slproweb.com/products/Win32OpenSSL.html

then set this EnvironmentVariable:

设置 OPENSSL_DIR=C:\Program Files\OpenSSL-Win64\

在Linux上:

sudo apt-get install pkg-config libssl-dev

or

须藤 pacman -S openssl

or

sudo dnf 安装 openssl-devel

or

curl -O https://www.openssl.org/source/openssl-1.1.0f.tar.gz https://www.openssl.org/source/openssl-1.1.0f.tar.gz tar xf

openssl-1.1.0f.tar.gz cd openssl-1.1.0f 导出 CC=... ./配置

--prefix=... linux-x86_64 -fPIC make -j$(nproc) make install

在 osx 中:

xcode-选择--安装

酿造安装openssl

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

错误:无法为“openssl v0.9.24”运行自定义构建命令 的相关文章

随机推荐