错误:无法为“openssl v0.9.24"运行自定义构建命令 [英] error: failed to run custom build command for `openssl v0.9.24`

查看:56
本文介绍了错误:无法为“openssl v0.9.24"运行自定义构建命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

错误:无法为 `openssl v0.9.24` 运行自定义构建命令引起的:进程没有成功退出:`/tmp/cargo-install7N44TO/release/build/openssl-65bb03053b1fc095/build-script-build`(退出代码:101)--- 标准错误线程main"在无法检测到 OpenSSL 版本"时恐慌,/home/jiri/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.24/build.rs:16:14注意:使用 `RUST_BACKTRACE=1` 环境变量运行以显示回溯.警告:构建失败,正在等待其他作业完成...错误:无法编译`cargo-apk v0.4.0`,可以在`/tmp/cargo-install7N44TO`找到中间工件引起的:构建失败

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

解决方案

rust openssl-sys 库需要安装 openssl.

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

然后设置这个EnvironmentVariable:

<块引用>

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

在 Linux 上:

<块引用>

sudo apt-get install pkg-config libssl-dev

<块引用>

sudo pacman -S openssl

<块引用>

sudo dnf 安装 openssl-devel

<块引用>

curl -O https://www.openssl.org/源/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

<块引用>

brew install openssl

I want to install cargo-apk cargo install cargo-apk to my system (Linux Mint), but I'm getting this error

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.

解决方案

rust openssl-sys library needs openssl installed.

then on Windows : download and install it from here first : http://slproweb.com/products/Win32OpenSSL.html

then set this EnvironmentVariable:

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

on linux :

sudo apt-get install pkg-config libssl-dev

or

sudo pacman -S openssl

or

sudo dnf install openssl-devel

or

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

and in osx just :

xcode-select --install

brew install openssl

这篇关于错误:无法为“openssl v0.9.24"运行自定义构建命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆