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 · 12 comments
Open

Can't install it #63

lionas89 opened this issue Jan 3, 2018 · 12 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?).

@sang-shelton
Copy link

Error

$ cargo install cargo-update
    Updating crates.io index
  Installing cargo-update v16.1.0
    Updating crates.io index
     Locking 121 packages to latest compatible versions
      Adding clap v3.2.25 (available: v4.5.27)
      Adding embed-resource v2.5.1 (available: v3.0.1)
      Adding home v0.5.9 (available: v0.5.11)
   Compiling libc v0.2.169
   Compiling shlex v1.3.0
   Compiling proc-macro2 v1.0.93
   Compiling unicode-ident v1.0.14
   Compiling pkg-config v0.3.31
   Compiling serde v1.0.217
   Compiling vcpkg v0.2.15
   Compiling stable_deref_trait v1.2.0
   Compiling writeable v0.5.5
   Compiling litemap v0.7.4
   Compiling semver v1.0.25
   Compiling icu_locid_transform_data v1.5.0
   Compiling io-lifetimes v1.0.11
   Compiling icu_properties_data v1.5.0
   Compiling hashbrown v0.15.2
   Compiling equivalent v1.0.1
   Compiling write16 v1.0.0
   Compiling rustix v0.37.28
   Compiling smallvec v1.13.2
   Compiling winnow v0.6.24
   Compiling utf8_iter v1.0.4
   Compiling icu_normalizer_data v1.5.0
   Compiling utf16_iter v1.0.5
   Compiling linux-raw-sys v0.3.8
   Compiling autocfg v1.4.0
   Compiling bitflags v1.3.2
   Compiling percent-encoding v2.3.1
   Compiling memchr v2.7.4
   Compiling curl v0.4.47
   Compiling hashbrown v0.12.3
   Compiling os_str_bytes v6.6.1
   Compiling openssl-probe v0.1.5
   Compiling bitflags v2.8.0
   Compiling once_cell v1.20.2
   Compiling termcolor v1.4.1
   Compiling unicode-width v0.2.0
   Compiling log v0.4.25
   Compiling form_urlencoded v1.2.1
   Compiling strsim v0.10.0
   Compiling array_tool v1.0.3
   Compiling home v0.5.9
   Compiling json-deserializer v0.4.4
   Compiling hex v0.4.3
   Compiling clap_lex v0.2.4
   Compiling tabwriter v1.4.1
   Compiling indexmap v1.9.3
   Compiling indexmap v2.7.1
   Compiling quote v1.0.38
   Compiling syn v2.0.96
   Compiling jobserver v0.1.32
   Compiling atty v0.2.14
   Compiling socket2 v0.5.8
   Compiling cc v1.2.10
   Compiling serde_spanned v0.6.8
   Compiling toml_datetime v0.6.8
   Compiling synstructure v0.13.1
   Compiling toml_edit v0.22.22
   Compiling rustc_version v0.4.1
   Compiling libz-sys v1.1.21
   Compiling openssl-sys v0.9.104
   Compiling libnghttp2-sys v0.1.11+1.64.0
   Compiling libssh2-sys v0.3.0
   Compiling curl-sys v0.4.78+curl-8.11.0
   Compiling libgit2-sys v0.18.0+1.9.0
   Compiling terminal_size v0.2.6
   Compiling textwrap v0.16.1
   Compiling zerovec-derive v0.10.3
   Compiling displaydoc v0.2.5
   Compiling icu_provider_macros v1.5.0
   Compiling serde_derive v1.0.217
   Compiling zerofrom-derive v0.1.5
   Compiling yoke-derive v0.7.5
   Compiling clap v3.2.25
warning: openssl-sys@0.9.104: 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. See stderr section below for further information.
error: failed to run custom build command for `openssl-sys v0.9.104`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installxJ8hP4/release/build/openssl-sys-0bcf0e547a7e6a46/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-check-cfg=cfg(osslconf, values("OPENSSL_NO_OCB", "OPENSSL_NO_SM4", "OPENSSL_NO_SEED", "OPENSSL_NO_CHACHA", "OPENSSL_NO_CAST", "OPENSSL_NO_IDEA", "OPENSSL_NO_CAMELLIA", "OPENSSL_NO_RC4", "OPENSSL_NO_BF", "OPENSSL_NO_PSK", "OPENSSL_NO_DEPRECATED_3_0", "OPENSSL_NO_SCRYPT", "OPENSSL_NO_SM3", "OPENSSL_NO_RMD160", "OPENSSL_NO_EC2M", "OPENSSL_NO_OCSP", "OPENSSL_NO_CMS", "OPENSSL_NO_COMP", "OPENSSL_NO_SOCK", "OPENSSL_NO_STDIO", "OPENSSL_NO_EC", "OPENSSL_NO_SSL3_METHOD", "OPENSSL_NO_KRB5", "OPENSSL_NO_TLSEXT", "OPENSSL_NO_SRP", "OPENSSL_NO_RFC3779", "OPENSSL_NO_SHA", "OPENSSL_NO_NEXTPROTONEG", "OPENSSL_NO_ENGINE", "OPENSSL_NO_BUF_FREELISTS"))
  cargo:rustc-check-cfg=cfg(openssl)
  cargo:rustc-check-cfg=cfg(libressl)
  cargo:rustc-check-cfg=cfg(boringssl)
  cargo:rustc-check-cfg=cfg(libressl250)
  cargo:rustc-check-cfg=cfg(libressl251)
  cargo:rustc-check-cfg=cfg(libressl252)
  cargo:rustc-check-cfg=cfg(libressl261)
  cargo:rustc-check-cfg=cfg(libressl270)
  cargo:rustc-check-cfg=cfg(libressl271)
  cargo:rustc-check-cfg=cfg(libressl273)
  cargo:rustc-check-cfg=cfg(libressl280)
  cargo:rustc-check-cfg=cfg(libressl281)
  cargo:rustc-check-cfg=cfg(libressl291)
  cargo:rustc-check-cfg=cfg(libressl310)
  cargo:rustc-check-cfg=cfg(libressl321)
  cargo:rustc-check-cfg=cfg(libressl332)
  cargo:rustc-check-cfg=cfg(libressl340)
  cargo:rustc-check-cfg=cfg(libressl350)
  cargo:rustc-check-cfg=cfg(libressl360)
  cargo:rustc-check-cfg=cfg(libressl361)
  cargo:rustc-check-cfg=cfg(libressl370)
  cargo:rustc-check-cfg=cfg(libressl380)
  cargo:rustc-check-cfg=cfg(libressl381)
  cargo:rustc-check-cfg=cfg(libressl382)
  cargo:rustc-check-cfg=cfg(libressl390)
  cargo:rustc-check-cfg=cfg(libressl400)
  cargo:rustc-check-cfg=cfg(ossl101)
  cargo:rustc-check-cfg=cfg(ossl102)
  cargo:rustc-check-cfg=cfg(ossl102f)
  cargo:rustc-check-cfg=cfg(ossl102h)
  cargo:rustc-check-cfg=cfg(ossl110)
  cargo:rustc-check-cfg=cfg(ossl110f)
  cargo:rustc-check-cfg=cfg(ossl110g)
  cargo:rustc-check-cfg=cfg(ossl110h)
  cargo:rustc-check-cfg=cfg(ossl111)
  cargo:rustc-check-cfg=cfg(ossl111b)
  cargo:rustc-check-cfg=cfg(ossl111c)
  cargo:rustc-check-cfg=cfg(ossl111d)
  cargo:rustc-check-cfg=cfg(ossl300)
  cargo:rustc-check-cfg=cfg(ossl310)
  cargo:rustc-check-cfg=cfg(ossl320)
  cargo:rustc-check-cfg=cfg(ossl330)
  cargo:rustc-check-cfg=cfg(ossl340)
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_DIR
  OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=OPENSSL_STATIC
  cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR


  Could not find openssl via pkg-config:

  pkg-config exited with status code 1
  > PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags openssl

  The system library `openssl` required by crate `openssl-sys` was not found.
  The file `openssl.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
  The PKG_CONFIG_PATH environment variable is not set.

  HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `openssl.pc`.


  cargo:warning=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. See stderr section below for further information.

  --- stderr


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


warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-update v16.1.0`, intermediate artifacts can be found at `/tmp/cargo-installxJ8hP4`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

In MXLinux 23 (Debian 12 bookworm) sudo apt install libssl-dev solved the problem.

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

6 participants