jmacdonald / amp

A complete text editor for your terminal.
https://amp.rs
Other
3.74k stars 106 forks source link

Build fail #75

Closed exvx closed 6 years ago

exvx commented 6 years ago

I get the same message when running cargo install amp and cargo build --release from the cloned repo. It prints Could not find directory of OpenSSL installation, even though openssl is installed.

Here's the full error message:

error: failed to run custom build command for `openssl-sys v0.9.27`
process didn't exit successfully: `/tmp/cargo-install.yJ1wLyvtL0b7/release/build/openssl-sys-7b6643d0518785c1/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
cargo:rerun-if-env-changed=OPENSSL_DIR
run pkg_config fail: "`\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"` did not exit successfully: exit code: 1\n--- stderr\nPackage openssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openssl.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'openssl\' found\n"

--- stderr
thread 'main' panicked at '

Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
compilation process.

If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.

    $HOST = x86_64-unknown-linux-gnu
    $TARGET = x86_64-unknown-linux-gnu
    openssl-sys = 0.9.27

', .cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.27/build.rs:213:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: failed to compile `amp v0.3.4`, intermediate artifacts can be found at `/tmp/cargo-install.yJ1wLyvtL0b7`

Caused by:
  build failed

My own incompetence could be the cause. I'd appreciate any help.

Edit Some more information: I'm running a fresh install of Ubuntu 17.10. I've installed amp a couple times on different machines, and I've built it as well when that didn't work, but this is the first time I get the same error message for both installing and building.

exvx commented 6 years ago

sudo apt remove openssl && sudo apt install openssl somehow fixed it. My openssl install was probably in a weird place. I apologize if this shouldn't have been an issue.

jmacdonald commented 6 years ago

Glad you got this sorted! 🙂