简体   繁体   English

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

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

I want to install cargo-apk cargo install cargo-apk to my system (Linux Mint), but I'm getting this error我想安装 cargo-apk cargo 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

I found that I should install libssl-dev, so I did, but it didn't help.我发现我应该安装 libssl-dev,所以我安装了,但没有帮助。

rust openssl-sys library needs openssl installed. rust openssl-sys 库需要安装 openssl。

then on Windows : download and install it from here first : http://slproweb.com/products/Win32OpenSSL.html然后在 Windows 上:首先从这里下载并安装它: http : //slproweb.com/products/Win32OpenSSL.html

then set this EnvironmentVariable:

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

on linux :在 Linux 上:

sudo apt-get install pkg-config libssl-dev sudo apt-get install pkg-config libssl-dev

or或者

sudo pacman -S openssl须藤吃豆子 -S openssl

or或者

sudo dnf install openssl-devel须藤 dnf 安装 openssl-devel

or或者

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

openssl-1.1.0f.tar.gz cd openssl-1.1.0f export CC=... ./Configure openssl-1.1.0f.tar.gz cd openssl-1.1.0f export CC=... ./Configure

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

and in osx just :在 osx 中:

xcode-select --install xcode-select --install

brew install openssl酿造安装openssl

I faced similar issue in Windows. Steps I did to resolve the issue.我在 Windows 中遇到过类似的问题。我为解决该问题所做的步骤。

  1. Install cygwin - https://www.cygwin.com/安装 cygwin - https://www.cygwin.com/
  2. Install perl(from cygwin bash terminal) - https://learn.perl.org/installing/windows.html安装 perl(从 cygwin bash 终端)- https://learn.perl.org/installing/windows.html
  3. Then tried cargo install from cygwin bash terminal.然后尝试从 cygwin bash 终端进行货物安装。

I know this is late, but I believe you need perl installed.我知道这已经晚了,但我相信您需要安装perl

This is what I did on Windows to solve this problem.这就是我在 Windows 上所做的来解决这个问题。

暂无
暂无

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

相关问题 错误:无法使用 Rust/Anchor 为 `openssl-sys v0.9.72` 运行自定义构建命令 - error: failed to run custom build command for `openssl-sys v0.9.72` using Rust/Anchor 错误:无法为“ring v0.16.20”运行自定义构建命令 - error: failed to run custom build command for `ring v0.16.20` 错误:无法为 `gmp-mpfr-sys v1.4.0` 运行自定义构建命令 - Error: Failed to run custom build command for `gmp-mpfr-sys v1.4.0` 一些错误无法为 `librocksdb-sys v6.11.4` 运行自定义构建命令 - some error failed to run custom build command for `librocksdb-sys v6.11.4` 错误:无法为 libudev-sys v0.1.4 运行自定义构建命令 - error: failed to run custom build command for `libudev-sys v0.1.4` Rust 编译错误“无法为 `freetype-sys v0.13.1' 运行自定义构建命令”win 10 - Rust compilation error " failed to run custom build command for `freetype-sys v0.13.1' " win 10 货物错误:无法为“atk-sys v0.10.0”运行自定义构建命令 - Cargo error: failed to run custom build command for `atk-sys v0.10.0` 错误:无法为onig_sys v61.1.0运行自定义生成命令 - error: failed to run custom build command for `onig_sys v61.1.0` 启动 Actix-web 时出错:无法为 `brotli-sys v0.3.2` 运行自定义构建命令 - Error when getting started Actix-web: failed to run custom build command for `brotli-sys v0.3.2` 货物测试--无法为 `ring v0.16.9` 运行自定义构建命令 - Cargo test--failed to run custom build command for `ring v0.16.9`
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM