货物无法建立openssl

时间:2016-04-08 08:17:40

标签: rust rust-cargo nickel

我正在使用nickel.rs构建一个Web应用程序。一切都很顺利但是当我执行cargo run时,由于超级依赖性,我得到以下错误:

   Compiling openssl-sys-extras v0.7.9
   Compiling openssl-sys v0.7.9
   Compiling openssl v0.7.9
Build failed, waiting for other jobs to finish...
failed to run custom build command for `openssl v0.7.9`
Process didn't exit successfully: `/Users/menawi/Developer/rust/nickelodean/target/debug/build/openssl-66237fc32eb1ac40/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
TARGET = Some("x86_64-apple-darwin")
debug=true opt-level=0
HOST = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CC_x86_64-apple-darwin = None
CC_x86_64_apple_darwin = None
HOST_CC = None
CC = None
HOST = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CFLAGS_x86_64-apple-darwin = None
CFLAGS_x86_64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-m64" "-fPIC" "-o" "/Users/menawi/Developer/rust/nickelodean/target/debug/build/openssl-66237fc32eb1ac40/out/src/c_helpers.o" "-c" "src/c_helpers.c"
ExitStatus(ExitStatus(256))


command did not execute successfully, got: exit code: 1



--- stderr
src/c_helpers.c:1:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
         ^
1 error generated.
thread '<main>' panicked at 'explicit panic', /Users/menawi/.cargo/registry/src/github.com-88ac128001ac3a9a/gcc-0.3.26/src/lib.rs:818

我需要openssl,因为我的Web应用程序需要发出https个请求。我该如何解决这个错误?我在下面附上了Cargo.toml文件的副本:

[package]
name = "nickelodean"
version = "0.1.0"

[dependencies]
nickel = "0.8.0"
mustache = "0.7.0"
rustc-serialize = "0.3.18"
hyper="0.8"

0 个答案:

没有答案