Coder Social home page Coder Social logo

Can't install it about cargo-update HOT 11 OPEN

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024
Can't install it

from cargo-update.

Comments (11)

mati865 avatar mati865 commented on July 23, 2024 1

Now you need development version of libssh and probably git.

from cargo-update.

nikukyugamer avatar nikukyugamer commented on July 23, 2024 1

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

from cargo-update.

mati865 avatar mati865 commented on July 23, 2024

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.

from cargo-update.

lionas89 avatar lionas89 commented on July 23, 2024

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

from cargo-update.

mati865 avatar mati865 commented on July 23, 2024

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

from cargo-update.

lionas89 avatar lionas89 commented on July 23, 2024

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

from cargo-update.

dns2utf8 avatar dns2utf8 commented on July 23, 2024

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

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

Any updates on this?

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

What's the status on this issue?

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

@lionas89 h-hewwo?

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

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

from cargo-update.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.