veeso / termscp

đŸ–¥ A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3/SMB
https://termscp.veeso.dev
MIT License
1.66k stars 48 forks source link

[BUG] - Compile error when running the provided install script #115

Closed TobberH closed 2 years ago

TobberH commented 2 years ago

Description

Fails to compile with install script

Steps to reproduce

Run the provided install script: curl --proto '=https' --tlsv1.2 -sSLf "https://git.io/JBhDb" | sh

Expected behaviour

Should install the termscp program

Environment

Log

error[E0432]: unresolved import `cache::UsersCache`
   --> /home/REDACTED/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/lib.rs:145:9
    |
145 | pub use cache::UsersCache;
    |         ^^^^^^^^^^^^^^^^^ no `UsersCache` in `cache`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `users` due to previous error
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: termscp

Additional information

First I got this error:

error[E0583]: file not found for module `cache`
   --> /home/REDACTED/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/lib.rs:142:1
    |
142 | pub mod cache;
    | ^^^^^^^^^^^^^^
    |
    = help: to create the module `cache`, create file "/home/REDACTED/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/cache.rs" or "/home/REDACTED/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/cache/mod.rs"

error[E0432]: unresolved import `cache::UsersCache`
   --> /home/REDACTED/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/lib.rs:145:9
    |
145 | pub use cache::UsersCache;
    |         ^^^^^^^^^^^^^^^^^ no `UsersCache` in `cache`

Some errors have detailed explanations: E0432, E0583.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `users` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: termscp

So I tried to create the cache.rs file with touch. Not sure that's what you need to do? So that error went away, but now I got the other error in the above Log section.

veeso commented 2 years ago

Maybe you've previously installed an application which uses users but for some reason has the cache feature disabled and it's not trying to compile termscp with the cached source repository.

I'd try to clear the cache with rm -r ~/.cargo/registry then try to rebuild.

TobberH commented 2 years ago

That worked! Was able to complete compile and installation. Maybe add something like that in an installation trouble-shooting section?