resyncgg/armada

Installarion problem

Closed this issue · 4 comments

Hi
I'm having problems installing Armada on an Ubuntu VPS.
It's Ubuntu 20.04.3 LTS and uname -r shows 5.4.0-120-generic.
I install cargo via rust up with no problem. I then run cargo install armada, but everytime it gets to the Compiling armada v1.1.2 stage, it throws the errors below:

   Compiling armada v1.1.2
error[E0308]: mismatched types
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:45:24
    |
45  |             .set_style(ProgressStyle::default_spinner().template("{spinner:.yellow} Found: {msg:.green}"));
    |              --------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `ProgressStyle`, found enum `Result`
    |              |
    |              arguments to this function are incorrect
    |
    = note: expected struct `ProgressStyle`
                 found enum `Result<ProgressStyle, TemplateError>`
note: return type inferred to be `ProgressStyle` here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:35:26
    |
35  |       ) -> Vec<SocketAddr> {
    |  __________________________^
36  | |         let mut total_open_ports = Vec::new();
37  | |         let total_ports: u128 = targets.size() * ports.size() as u128;
38  | |         let _total_packets = total_ports * (1 + retries) as u128;
...   |
103 | |         total_open_ports
104 | |     }
    | |_____^
note: associated function defined here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.0/src/progress_bar.rs:134:12
    |
134 |     pub fn set_style(&self, style: ProgressStyle) {
    |            ^^^^^^^^^

error[E0308]: mismatched types
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:46:57
    |
46  |         found_and_stats_progress_bar.enable_steady_tick(50);
    |                                      ------------------ ^^ expected struct `Duration`, found integer
    |                                      |
    |                                      arguments to this function are incorrect
    |
note: return type inferred to be `Duration` here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:35:26
    |
35  |       ) -> Vec<SocketAddr> {
    |  __________________________^
36  | |         let mut total_open_ports = Vec::new();
37  | |         let total_ports: u128 = targets.size() * ports.size() as u128;
38  | |         let _total_packets = total_ports * (1 + retries) as u128;
...   |
103 | |         total_open_ports
104 | |     }
    | |_____^
note: associated function defined here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.0/src/progress_bar.rs:152:12
    |
152 |     pub fn enable_steady_tick(&self, interval: Duration) {
    |            ^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:51:24
    |
51  |             .set_style(ProgressStyle::default_spinner().template("{spinner:.yellow} In-flight Packets: {msg:.blue}"));
    |              --------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `ProgressStyle`, found enum `Result`
    |              |
    |              arguments to this function are incorrect
    |
    = note: expected struct `ProgressStyle`
                 found enum `Result<ProgressStyle, TemplateError>`
note: return type inferred to be `ProgressStyle` here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:35:26
    |
35  |       ) -> Vec<SocketAddr> {
    |  __________________________^
36  | |         let mut total_open_ports = Vec::new();
37  | |         let total_ports: u128 = targets.size() * ports.size() as u128;
38  | |         let _total_packets = total_ports * (1 + retries) as u128;
...   |
103 | |         total_open_ports
104 | |     }
    | |_____^
note: associated function defined here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.0/src/progress_bar.rs:134:12
    |
134 |     pub fn set_style(&self, style: ProgressStyle) {
    |            ^^^^^^^^^

error[E0308]: mismatched types
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:52:50
    |
52  |         inflight_progress_bar.enable_steady_tick(50);
    |                               ------------------ ^^ expected struct `Duration`, found integer
    |                               |
    |                               arguments to this function are incorrect
    |
note: return type inferred to be `Duration` here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:35:26
    |
35  |       ) -> Vec<SocketAddr> {
    |  __________________________^
36  | |         let mut total_open_ports = Vec::new();
37  | |         let total_ports: u128 = targets.size() * ports.size() as u128;
38  | |         let _total_packets = total_ports * (1 + retries) as u128;
...   |
103 | |         total_open_ports
104 | |     }
    | |_____^
note: associated function defined here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.0/src/progress_bar.rs:152:12
    |
152 |     pub fn enable_steady_tick(&self, interval: Duration) {
    |            ^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:56:43
    |
56  |         total_scan_progress_bar.set_style(ProgressStyle::default_bar().template(get_progress_stylization(&rate_limit, retries)));
    |                                 --------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `ProgressStyle`, found enum `Result`
    |                                 |
    |                                 arguments to this function are incorrect
    |
    = note: expected struct `ProgressStyle`
                 found enum `Result<ProgressStyle, TemplateError>`
note: return type inferred to be `ProgressStyle` here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:35:26
    |
35  |       ) -> Vec<SocketAddr> {
    |  __________________________^
36  | |         let mut total_open_ports = Vec::new();
37  | |         let total_ports: u128 = targets.size() * ports.size() as u128;
38  | |         let _total_packets = total_ports * (1 + retries) as u128;
...   |
103 | |         total_open_ports
104 | |     }
    | |_____^
note: associated function defined here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.0/src/progress_bar.rs:134:12
    |
134 |     pub fn set_style(&self, style: ProgressStyle) {
    |            ^^^^^^^^^

error[E0308]: mismatched types
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:57:52
    |
57  |         total_scan_progress_bar.enable_steady_tick(50);
    |                                 ------------------ ^^ expected struct `Duration`, found integer
    |                                 |
    |                                 arguments to this function are incorrect
    |
note: return type inferred to be `Duration` here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:35:26
    |
35  |       ) -> Vec<SocketAddr> {
    |  __________________________^
36  | |         let mut total_open_ports = Vec::new();
37  | |         let total_ports: u128 = targets.size() * ports.size() as u128;
38  | |         let _total_packets = total_ports * (1 + retries) as u128;
...   |
103 | |         total_open_ports
104 | |     }
    | |_____^
note: associated function defined here
   --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.0/src/progress_bar.rs:152:12
    |
152 |     pub fn enable_steady_tick(&self, interval: Duration) {
    |            ^^^^^^^^^^^^^^^^^^

error[E0599]: no method named `join_and_clear` found for struct `MultiProgress` in the current scope
  --> /home/xnl/.cargo/registry/src/github.com-1ecc6299db9ec823/armada-1.1.2/src/run_variants/run_with_stats.rs:59:69
   |
59 |         let mpb_thread_handle = std::thread::spawn(move || multi_pb.join_and_clear());
   |                                                                     ^^^^^^^^^^^^^^ method not found in `MultiProgress`

Some errors have detailed explanations: E0308, E0599.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `armada` due to 7 previous errors
error: failed to compile `armada v1.1.2`, intermediate artifacts can be found at `/tmp/cargo-installcABU4s`

I'm sure this is something obvious I haven't done, or something else set up incorrectly, but can anyone help with this?
Regards
Xnl

Hello! I'm looking into this issue right now. I suspect the issue is that I haven't pinned the dependencies and one of them updated their public API in a way that makes it incompatible with how I wrote it.

Will write back when I know more.

Yup! indicatif is the library we use to show the visual progress updates in the tool. They had a somewhat recent change and the version we depend on wasn't locked. I've updated armada to work with the latest indicatif library and published the new version to https://crates.io.

Try reinstalling armada now and let me know if that works! I'm going to close this issue out, but feel free to ping me if you need more help.

That's @d0nutptr, works grat now!

Happy to hear it! :D

Enjoy armada!