Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 18: failed to run custom build command for `openssl-sys v0.9.39` #1021

Closed
karasjoh000 opened this issue Nov 24, 2018 · 8 comments

Comments

@karasjoh000
Copy link

@karasjoh000 karasjoh000 commented Nov 24, 2018

installed libssl-dev on ubuntu 18 and still get this error:
error: failed to run custom build command for openssl-sys v0.9.39
process didn't exit successfully: /home/forecast/cs453_finalproj_backend/target/release/build/openssl-sys-864259d0b1f702fc/build-script-main (exit code: 101)

@karasjoh000

This comment has been minimized.

Copy link
Author

@karasjoh000 karasjoh000 commented Nov 24, 2018

might be same as #994 but too many comments there, can't find what will actually work

1.1.0g-2ubuntu4.1

@sfackler

This comment has been minimized.

Copy link
Owner

@sfackler sfackler commented Nov 24, 2018

What does the rest of the error message say? In particular, you need pkg-config installed.

@karasjoh000

This comment has been minimized.

Copy link
Author

@karasjoh000 karasjoh000 commented Nov 24, 2018

elease
Compiling openssl-sys v0.9.39
error: failed to run custom build command for openssl-sys v0.9.39
process didn't exit successfully: /home/forecast/cs453_finalproj_backend/target/release/build/openssl-sys-864259d0b1f702fc/build-script-main (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: "Failed to run \"pkg-config\" \"--libs\" \"--cflags\" \"openssl\": No such file or directory (os error 2)"

--- 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.

Make sure you also have the development packages of openssl installed.
For example, libssl-dev on Ubuntu or openssl-devel on Fedora.

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.39

It looks like you're compiling on Linux and also targeting Linux. Currently this
requires the pkg-config utility to find OpenSSL but unfortunately pkg-config
could not be found. If you have OpenSSL installed you can likely fix this by
installing pkg-config.

', /home/forecast/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.39/build/main.rs:269:9
stack backtrace:
0: std::sys::unix::backtrace::tracing:👿:unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:59
at src/libstd/panicking.rs:211
3: std::panicking::default_hook
at src/libstd/panicking.rs:227
4: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:476
5: std::panicking::begin_panic
6: build_script_main:👿:get_openssl
7: build_script_main::main
8: std::rt::lang_start::{{closure}}
9: std::panicking::try::do_call
at src/libstd/rt.rs:59
at src/libstd/panicking.rs:310
10: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:102
11: std::rt::lang_start_internal
at src/libstd/panicking.rs:289
at src/libstd/panic.rs:398
at src/libstd/rt.rs:58
12: main
13: __libc_start_main
14: _start

@karasjoh000

This comment has been minimized.

Copy link
Author

@karasjoh000 karasjoh000 commented Nov 24, 2018

so how do I configure pkg-config

@karasjoh000

This comment has been minimized.

Copy link
Author

@karasjoh000 karasjoh000 commented Nov 24, 2018

Works now, ran sudo apt install pkg-config

@agryaznov

This comment has been minimized.

Copy link

@agryaznov agryaznov commented May 20, 2019

Works now, ran sudo apt install pkg-config

Didn't help in my case. What helped was to get that openssl library sources and build it ourselves

See the full list of commands here

@ssainball

This comment has been minimized.

Copy link

@ssainball ssainball commented Sep 29, 2019

Works now, ran sudo apt install pkg-config

Thank you very much. from Korea.

@lechatthecat

This comment has been minimized.

Copy link

@lechatthecat lechatthecat commented Oct 22, 2019

I'm using Ubuntu and the error message says:

Make sure you also have the development packages of openssl installed.
For example, libssl-dev on Ubuntu or openssl-devel on Fedora.

So I installed it:

sudo apt install libssl-dev

And it is working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.