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

Can't install it #63

Open
lionas89 opened this issue Jan 3, 2018 · 11 comments
Open

Can't install it #63

lionas89 opened this issue Jan 3, 2018 · 11 comments

Comments

@lionas89
Copy link

lionas89 commented Jan 3, 2018

Hello,

On installing i got this:

error: failed to compile cargo-update v1.4.0, intermediate artifacts can be found at /tmp/cargo-install.JpEXDBLLIpMP

How to fix this?

root@chip:~# cargo --version
cargo 0.23.0 (61fa02415 2017-11-22)

@mati865
Copy link
Contributor

mati865 commented Jan 3, 2018

Run installation with RUST_BACKTRACE=1 and post whole build log. Your current info doesn't tell anything relevant but I guess it's git2-rs/ssh2-rs again.

@lionas89
Copy link
Author

lionas89 commented Jan 4, 2018

Sorry, I'm new with this.

root@chip:~# cargo install cargo-update RUST_BACKTRACE=1
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing cargo-update v1.4.0
 Downloading libc v0.2.35
 Downloading curl-sys v0.3.16
 Downloading curl-sys v0.4.1
   Compiling quote v0.3.15
   Compiling serde v1.0.27
   Compiling lazy_static v1.0.0
   Compiling array_tool v0.4.1
   Compiling json v0.11.12
   Compiling bitflags v0.9.1
   Compiling void v1.0.2
   Compiling pkg-config v0.3.9
   Compiling percent-encoding v1.0.1
   Compiling unicode-normalization v0.1.5
   Compiling regex-syntax v0.4.2
   Compiling utf8-ranges v1.0.0
   Compiling bitflags v1.0.1
   Compiling matches v0.1.6
   Compiling unicode-width v0.1.4
   Compiling ansi_term v0.10.2
   Compiling unicode-xid v0.0.4
   Compiling strsim v0.6.0
   Compiling libc v0.2.35
   Compiling vec_map v0.8.0
   Compiling lazy_static v0.2.11
   Compiling openssl-probe v0.1.2
   Compiling cc v1.0.3
   Compiling embed-resource v1.1.4
   Compiling semver-parser v0.7.0
   Compiling toml v0.4.5
   Compiling unreachable v1.0.0
   Compiling unicode-bidi v0.3.4
   Compiling tabwriter v1.0.3
   Compiling textwrap v0.9.0
   Compiling synom v0.11.3
   Compiling atty v0.2.6
   Compiling memchr v2.0.1
   Compiling rand v0.3.19
   Compiling openssl-sys v0.9.23
   Compiling cmake v0.1.29
   Compiling libz-sys v1.0.18
   Compiling curl-sys v0.4.1
   Compiling cargo-update v1.4.0
   Compiling semver v0.8.0
   Compiling thread_local v0.3.5
   Compiling idna v0.1.4
   Compiling syn v0.11.11
   Compiling clap v2.29.0
   Compiling aho-corasick v0.6.4
   Compiling lazysort v0.1.1
error: failed to compile `cargo-update v1.4.0`, intermediate artifacts can be fo
und at `/tmp/cargo-install.vqolwdusGCj7`

Caused by:
  failed to run custom build command for `openssl-sys v0.9.23`
process didn't exit successfully: `/tmp/cargo-install.vqolwdusGCj7/release/build
/openssl-sys-c1e2112fbf76227b/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=ARMV7_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=ARMV7_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=ARMV7_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_DIR
cargo:rerun-if-env-changed=OPENSSL_DIR
run pkg_config fail: "`\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"` did n
ot 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 `o
penssl.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 = armv7-unknown-linux-gnueabihf
    $TARGET = armv7-unknown-linux-gnueabihf
    openssl-sys = 0.9.23

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

error: could not find `RUST_BACKTRACE=1` in `registry https://github.com/rust-la
ng/crates.io-index`

Summary: Failed to install cargo-update, RUST_BACKTRACE=1 (see error(s) above).
error: some crates failed to install

@mati865
Copy link
Contributor

mati865 commented Jan 4, 2018

You need to install development openssl package on your system via its own package manager.

@lionas89
Copy link
Author

lionas89 commented Jan 4, 2018

Thank you,

I installed libssl-dev. Is there a list what programs/compilers I need? My next errors:

error: failed to compile `cargo-update v1.4.0`, intermediate artifacts can be found at `/tmp/cargo-install.gIJ6cmg2kWPh`

Caused by:
  failed to run custom build command for `libssh2-sys v0.2.6`
process didn't exit successfully: `/tmp/cargo-install.gIJ6cmg2kWPh/release/build/libssh2-sys-26d1c4d295da1ba4/build-script-build` (exit code: 101)
--- stdout
running: "cmake" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.2.6/libssh2" "-DCRYPTO_BACKEND=OpenSSL" "-DBUILD_SHARED_LIBS=OFF" "-DENABLE_ZLIB_COMPRESSION=ON" "-DCMAKE_INSTALL_LIBDIR=lib" "-DBUILD_EXAMPLES=OFF" "-DBUILD_TESTING=OFF" "-DCMAKE_INSTALL_PREFIX=/tmp/cargo-install.gIJ6cmg2kWPh/release/build/libssh2-sys-b15e0c70de083857/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -march=armv7-a" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -march=armv7-a" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_BUILD_TYPE=Release"

--- stderr
fatal: Not a git repository (or any of the parent directories): .git
thread 'main' panicked at '
failed to execute command: No such file or directory (os error 2)
is `cmake` not installed?

build script failed, must exit now', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.29/src/lib.rs:632:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: could not find `RUST_BACKTRACE=1` in `registry https://github.com/rust-lang/crates.io-index`

Summary: Failed to install cargo-update, RUST_BACKTRACE=1 (see error(s) above).
error: some crates failed to install

@mati865
Copy link
Contributor

mati865 commented Jan 4, 2018

Now you need development version of libssh and probably git.

@dns2utf8
Copy link

With this error message you need cmake. My tip for debian systems is sudo apt install build-essential clang cmake git libssl-dev

@nabijaczleweli
Copy link
Owner

Any updates on this?

@nabijaczleweli
Copy link
Owner

What's the status on this issue?

@nabijaczleweli
Copy link
Owner

@lionas89 h-hewwo?

@nikukyugamer
Copy link

In my case, build-essential clang cmake git libssl-dev and pkg-config are required on Ubuntu 20.04 (x64).

Here is an error log.

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


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

@nabijaczleweli
Copy link
Owner

Noted pkg-config dependency in the README, fair cop, but it seems that the dependency errors have gotten good since January 2018(!) — indeed, it told you what you need (not sure about the CMake – what needs it?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants