簡體   English   中英

錯誤:無法為 `openssl v0.9.24` 運行自定義構建命令

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

我想安裝 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

我發現我應該安裝 libssl-dev,所以我安裝了,但沒有幫助。

rust openssl-sys 庫需要安裝 openssl。

然后在 Windows 上:首先從這里下載並安裝它: 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

或者

須藤吃豆子 -S openssl

或者

須藤 dnf 安裝 openssl-devel

或者

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

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

在 osx 中:

xcode-select --install

釀造安裝openssl

我在 Windows 中遇到過類似的問題。我為解決該問題所做的步驟。

  1. 安裝 cygwin - https://www.cygwin.com/
  2. 安裝 perl(從 cygwin bash 終端)- https://learn.perl.org/installing/windows.html
  3. 然后嘗試從 cygwin bash 終端進行貨物安裝。

我知道這已經晚了,但我相信您需要安裝perl

這就是我在 Windows 上所做的來解決這個問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM