cjbassi/ytop

Cargo install fails Ubuntu

Closed this issue · 1 comments

This may be user error as I'm not familiar with rust, sorry about that.

 uname -a
Linux styler 5.0.0-38-generic #41-Ubuntu SMP Tue Dec 3 00:27:35 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
styler@styler:~$ sudo cargo install ytop
[sudo] password for styler: 
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading ytop v0.6.2
  Installing ytop v0.6.2
 Downloading better-panic v0.2.0
 Downloading fern v0.6.0
 Downloading ctrlc v3.1.6
 Downloading serde v1.0.114
 Downloading battery v0.7.5
 Downloading size v0.1.2
 Downloading log v0.4.11
 Downloading chrono v0.4.13
 Downloading platform-dirs v0.2.0
 Downloading crossterm v0.17.5
 Downloading structopt v0.3.15
 Downloading once_cell v1.4.0
 Downloading psutil v3.1.0
 Downloading num-rational v0.2.4
 Downloading serde_json v1.0.57
 Downloading tui v0.9.5
 Downloading crossbeam-channel v0.4.3
 Downloading console v0.9.2
 Downloading backtrace v0.3.50
 Downloading libc v0.2.74
 Downloading clicolors-control v1.0.1
 Downloading lazy_static v1.4.0
 Downloading regex v1.3.9
 Downloading regex-syntax v0.6.18
 Downloading rustc-demangle v0.1.16
 Downloading addr2line v0.13.0
 Downloading object v0.20.0
 Downloading miniz_oxide v0.4.0
 Downloading cfg-if v0.1.10
 Downloading gimli v0.22.0
 Downloading adler v0.2.3
 Downloading serde_derive v1.0.114
 Downloading quote v1.0.7
 Downloading proc-macro2 v1.0.19
 Downloading syn v1.0.36
 Downloading unicode-xid v0.2.1
 Downloading num-traits v0.2.12
 Downloading uom v0.26.0
 Downloading autocfg v1.0.0
 Downloading typenum v1.12.0
 Downloading time v0.1.43
 Downloading num-integer v0.1.43
 Downloading dirs v2.0.2
 Downloading dirs-sys v0.3.5
 Downloading bitflags v1.2.1
 Downloading parking_lot v0.10.2
 Downloading lock_api v0.3.4
 Downloading parking_lot_core v0.7.2
 Downloading scopeguard v1.1.0
 Downloading smallvec v1.4.1
 Downloading structopt-derive v0.4.8
 Downloading clap v2.33.1
 Downloading heck v0.3.1
 Downloading proc-macro-error v1.0.4
 Downloading unicode-segmentation v1.6.0
 Downloading proc-macro-error-attr v1.0.4
 Downloading version_check v0.9.2
 Downloading vec_map v0.8.2
 Downloading textwrap v0.11.0
 Downloading unicode-width v0.1.8
 Downloading strsim v0.8.0
 Downloading atty v0.2.14
 Downloading platforms v0.2.1
 Downloading nix v0.17.0
 Downloading snafu v0.6.8
 Downloading derive_more v0.99.9
 Downloading unescape v0.1.0
 Downloading num_cpus v1.13.0
 Downloading glob v0.3.0
 Downloading void v1.0.2
 Downloading snafu-derive v0.6.8
 Downloading doc-comment v0.3.3
 Downloading num-bigint v0.2.6
 Downloading ryu v1.0.5
 Downloading itoa v0.4.6
 Downloading cassowary v0.3.0
 Downloading either v1.5.3
 Downloading itertools v0.9.0
 Downloading crossbeam-utils v0.7.2
 Downloading termios v0.3.2
 Downloading lazycell v1.2.1
 Downloading signal-hook v0.1.16
 Downloading mio v0.6.22
 Downloading signal-hook-registry v1.2.0
 Downloading iovec v0.1.4
 Downloading net2 v0.2.34
 Downloading slab v0.4.2
 Downloading arc-swap v0.4.7
 Downloading ansi_term v0.11.0
   Compiling rustc-demangle v0.1.16
   Compiling syn v1.0.36
   Compiling doc-comment v0.3.3
   Compiling version_check v0.9.2
error[E0277]: the trait bound `std::option::Option<std::ffi::OsString>: std::ops::Try` is not satisfied
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.36/build.rs:29:17
   |
29 |     let rustc = env::var_os("RUSTC")?;
   |                 ---------------------
   |                 |
   |                 the trait `std::ops::Try` is not implemented for `std::option::Option<std::ffi::OsString>`
   |                 in this macro invocation
   |
   = note: required by `std::ops::Try::into_result`

error[E0277]: the trait bound `std::option::Option<Compiler>: std::ops::Try` is not satisfied
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.36/build.rs:29:17
   |
29 |     let rustc = env::var_os("RUSTC")?;
   |                 ---------------------
   |                 |
   |                 the trait `std::ops::Try` is not implemented for `std::option::Option<Compiler>`
   |                 in this macro invocation
   |
   = note: required by `std::ops::Try::from_error`

error[E0277]: the trait bound `std::option::Option<std::process::Output>: std::ops::Try` is not satisfied
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.36/build.rs:30:18
   |
30 |     let output = Command::new(rustc).arg("--version").output().ok()?;
   |                  ---------------------------------------------------
   |                  |
   |                  the trait `std::ops::Try` is not implemented for `std::option::Option<std::process::Output>`
   |                  in this macro invocation
   |
   = note: required by `std::ops::Try::into_result`

error[E0277]: the trait bound `std::option::Option<Compiler>: std::ops::Try` is not satisfied
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.36/build.rs:30:18
   |
30 |     let output = Command::new(rustc).arg("--version").output().ok()?;
   |                  ---------------------------------------------------
   |                  |
   |                  the trait `std::ops::Try` is not implemented for `std::option::Option<Compiler>`
   |                  in this macro invocation
   |
   = note: required by `std::ops::Try::from_error`

error[E0277]: the trait bound `std::option::Option<&str>: std::ops::Try` is not satisfied
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.36/build.rs:31:19
   |
31 |     let version = str::from_utf8(&output.stdout).ok()?;
   |                   ------------------------------------
   |                   |
   |                   the trait `std::ops::Try` is not implemented for `std::option::Option<&str>`
   |                   in this macro invocation
   |
   = note: required by `std::ops::Try::into_result`

error[E0277]: the trait bound `std::option::Option<Compiler>: std::ops::Try` is not satisfied
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.36/build.rs:31:19
   |
31 |     let version = str::from_utf8(&output.stdout).ok()?;
   |                   ------------------------------------
   |                   |
   |                   the trait `std::ops::Try` is not implemented for `std::option::Option<Compiler>`
   |                   in this macro invocation
   |
   = note: required by `std::ops::Try::from_error`

error[E0277]: the trait bound `std::option::Option<Compiler>: std::ops::Try` is not satisfied
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.36/build.rs:36:17
   |
36 |     let minor = pieces.next()?.parse().ok()?;
   |                 --------------
   |                 |
   |                 the trait `std::ops::Try` is not implemented for `std::option::Option<Compiler>`
   |                 in this macro invocation
   |
   = note: required by `std::ops::Try::from_error`

error[E0277]: the trait bound `std::option::Option<Compiler>: std::ops::Try` is not satisfied
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.36/build.rs:36:17
   |
36 |     let minor = pieces.next()?.parse().ok()?;
   |                 ----------------------------
   |                 |
   |                 the trait `std::ops::Try` is not implemented for `std::option::Option<Compiler>`
   |                 in this macro invocation
   |
   = note: required by `std::ops::Try::from_error`

error: aborting due to previous error(s)

error: Could not compile `syn`.
Build failed, waiting for other jobs to finish...
error[E0599]: no method named `is_control` found for type `char` in the current scope
   --> .cargo/registry/src/github.com-1ecc6299db9ec823/rustc-demangle-0.1.16/src/legacy.rs:168:43
    |
168 |                                     if !c.is_control() {
    |                                           ^^^^^^^^^^

error: aborting due to previous error(s)

error: Could not compile `rustc-demangle`.
Build failed, waiting for other jobs to finish...
error: failed to compile `ytop v0.6.2`, intermediate artifacts can be found at `/tmp/cargo-install.aR6r0TzPaIiH`

Caused by:
  build failed

Updating my rustc solved the issue, my mistake.