[GH-ISSUE #492] Error while installing from cargo #310

Closed
opened 2026-02-27 19:29:57 +03:00 by kerem · 1 comment
Owner

Originally created by @ghost on GitHub (Jun 13, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/492

Input: cargo install librespot

Error:

error[E0308]: mismatched types                                                                                                                              
  --> C:\Users\Akshat\.cargo\registry\src\github.com-1ecc6299db9ec823\librespot-protocol-0.1.1\build.rs:45:39
   |
45 |         let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc");
   |                                       ^^^^^^^ expected struct `std::path::Path`, found `str`
   |
   = note: expected reference `&std::path::Path`
              found reference `&'static str`

error[E0308]: mismatched types
  --> C:\Users\Akshat\.cargo\registry\src\github.com-1ecc6299db9ec823\librespot-protocol-0.1.1\build.rs:45:51
   |
45 |         let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc");
   |                                                   ^^^ expected struct `std::path::Path`, found struct `std::string::String`
   |
   = note: expected reference `&std::path::Path`
              found reference `&std::string::String`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
error: could not compile `librespot-protocol`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `librespot v0.1.1`, intermediate artifacts can be found at `C:\Users\Akshat\AppData\Local\Temp\cargo-installpFSihW`

Caused by:
  build failed
Originally created by @ghost on GitHub (Jun 13, 2020). Original GitHub issue: https://github.com/librespot-org/librespot/issues/492 Input: cargo install librespot Error: ``` error[E0308]: mismatched types --> C:\Users\Akshat\.cargo\registry\src\github.com-1ecc6299db9ec823\librespot-protocol-0.1.1\build.rs:45:39 | 45 | let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc"); | ^^^^^^^ expected struct `std::path::Path`, found `str` | = note: expected reference `&std::path::Path` found reference `&'static str` error[E0308]: mismatched types --> C:\Users\Akshat\.cargo\registry\src\github.com-1ecc6299db9ec823\librespot-protocol-0.1.1\build.rs:45:51 | 45 | let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc"); | ^^^ expected struct `std::path::Path`, found struct `std::string::String` | = note: expected reference `&std::path::Path` found reference `&std::string::String` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. error: could not compile `librespot-protocol`. To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: failed to compile `librespot v0.1.1`, intermediate artifacts can be found at `C:\Users\Akshat\AppData\Local\Temp\cargo-installpFSihW` Caused by: build failed ```
kerem closed this issue 2026-02-27 19:29:57 +03:00
Author
Owner

@ashthespy commented on GitHub (Jun 13, 2020):

Dupe of #477 and others mentioned there..

<!-- gh-comment-id:643639293 --> @ashthespy commented on GitHub (Jun 13, 2020): Dupe of #477 and others mentioned there..
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#310
No description provided.