[GH-ISSUE #137] Can't Install on MacOS #56

Open
opened 2026-05-05 22:07:08 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @vodkya on GitHub (May 22, 2024).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/137

lan-mouse refuses to build on MacOS (Monterey, 12.6). Prebuilt binaries work fine, but using cargo install lan-mouse fails. This also happens when building the repository. Below is the error:

cargo install lan-mouse
    Updating crates.io index
  Downloaded lan-mouse v0.8.0
  Downloaded 1 crate (112.8 KB) in 0.47s
  Installing lan-mouse v0.8.0
error: failed to compile `lan-mouse v0.8.0`, intermediate artifacts can be found at `/var/folders/03/9yv668fx0psccvppt4fp11zm0000gp/T/cargo-installXEXw61`

Caused by:
  failed to select a version for `env_logger`.
      ... required by package `lan-mouse v0.8.0`
  versions that meet the requirements `^0.11.3` are: 0.11.3

  the package `lan-mouse` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
   It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.


  failed to select a version for `env_logger` which could resolve this conflict

Installing does not fail on Arch.

Originally created by @vodkya on GitHub (May 22, 2024). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/137 lan-mouse refuses to build on MacOS (Monterey, 12.6). Prebuilt binaries work fine, but using `cargo install lan-mouse` fails. This also happens when building the repository. Below is the error: ``` cargo install lan-mouse Updating crates.io index Downloaded lan-mouse v0.8.0 Downloaded 1 crate (112.8 KB) in 0.47s Installing lan-mouse v0.8.0 error: failed to compile `lan-mouse v0.8.0`, intermediate artifacts can be found at `/var/folders/03/9yv668fx0psccvppt4fp11zm0000gp/T/cargo-installXEXw61` Caused by: failed to select a version for `env_logger`. ... required by package `lan-mouse v0.8.0` versions that meet the requirements `^0.11.3` are: 0.11.3 the package `lan-mouse` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features. It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name. failed to select a version for `env_logger` which could resolve this conflict ``` Installing does not fail on Arch.
Author
Owner

@feschber commented on GitHub (May 22, 2024):

Sounds like an issue with your rust installation. Could you try removing the ~/.cargo/registry directory and run the install command again?

<!-- gh-comment-id:2124286358 --> @feschber commented on GitHub (May 22, 2024): Sounds like an issue with your rust installation. Could you try removing the `~/.cargo/registry` directory and run the install command again?
Author
Owner

@vodkya commented on GitHub (May 25, 2024):

Unfortunately that doesn't seem to do anything. It still refuses to build with the same error.

<!-- gh-comment-id:2130654868 --> @vodkya commented on GitHub (May 25, 2024): Unfortunately that doesn't seem to do anything. It still refuses to build with the same error.
Author
Owner

@flashgnash commented on GitHub (Jul 16, 2024):

This appears to also be the case trying to build on windows 10 with the same error

<!-- gh-comment-id:2230501293 --> @flashgnash commented on GitHub (Jul 16, 2024): This appears to also be the case trying to build on windows 10 with the same error
Author
Owner

@feschber commented on GitHub (Jul 16, 2024):

Could you run

rustup update
rustup toolchain install stable-x86_64-pc-windows-msvc

and try this again?

<!-- gh-comment-id:2230543018 --> @feschber commented on GitHub (Jul 16, 2024): Could you run ```sh rustup update rustup toolchain install stable-x86_64-pc-windows-msvc ``` and try this again?
Author
Owner

@feschber commented on GitHub (Jul 16, 2024):

https://github.com/rust-lang/mdBook/issues/2318

it appears to be some issue with old versions of cargo

<!-- gh-comment-id:2230586217 --> @feschber commented on GitHub (Jul 16, 2024): https://github.com/rust-lang/mdBook/issues/2318 it appears to be some issue with old versions of cargo
Author
Owner

@flashgnash commented on GitHub (Jul 18, 2024):

rustup toolchain install stable-x86_64-pc-windows-msvc

Yep you're right, I'm getting a different error now but that's something unrelated

<!-- gh-comment-id:2236476920 --> @flashgnash commented on GitHub (Jul 18, 2024): > ```shell > rustup toolchain install stable-x86_64-pc-windows-msvc > ``` Yep you're right, I'm getting a different error now but that's something unrelated
Author
Owner

@feschber commented on GitHub (Jul 18, 2024):

rustup toolchain install stable-x86_64-pc-windows-msvc

Yep you're right, I'm getting a different error now but that's something unrelated

Make sure to follow the guide in the readme. Particularly the part about adding the gtk directory to $PATH

<!-- gh-comment-id:2237471580 --> @feschber commented on GitHub (Jul 18, 2024): > > ```shell > > rustup toolchain install stable-x86_64-pc-windows-msvc > > ``` > > Yep you're right, I'm getting a different error now but that's something unrelated Make sure to follow the guide in the readme. Particularly the part about adding the gtk directory to $PATH
Author
Owner

@jswhisperer commented on GitHub (Aug 9, 2024):

Not sure if related but this helped me, and updating rust

brew install llvm

which will output this... and you should do it

  echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
  export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
<!-- gh-comment-id:2278499773 --> @jswhisperer commented on GitHub (Aug 9, 2024): Not sure if related but this helped me, and updating rust ```brew install llvm``` which will output this... and you should do it ``` echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc export LDFLAGS="-L/opt/homebrew/opt/llvm/lib" export CPPFLAGS="-I/opt/homebrew/opt/llvm/include" ```
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: github-starred/lan-mouse#56
No description provided.