maxcurzi / tplay

A terminal ASCII media player. View images, gifs, videos, webcam, YouTube, etc.. directly in the terminal as ASCII art.
MIT License
208 stars 13 forks source link

[BUG] Can't install on Ubuntu #33

Closed MicaelJarniac closed 7 months ago

MicaelJarniac commented 7 months ago

Describe the bug I've installed Rust just to try this package, so I'm not experienced with it. I'm not being able to install it on Ubuntu.

To Reproduce Steps to reproduce the behavior:

cargo install tplay

  --- stderr
  thread 'main' panicked at /home/micael/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alsa-sys-0.3.1/build.rs:13:18:
  `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "pkg-config" "--libs" "--cflags" "alsa"` did not exit successfully: exit status: 1
  error: could not find system library 'alsa' required by the 'alsa-sys' crate

  --- stderr
  Package alsa was not found in the pkg-config search path.
  Perhaps you should add the directory containing `alsa.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'alsa', required by 'virtual:world', not found

  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `tplay v0.4.5`, intermediate artifacts can be found at `/tmp/cargo-installf3bw3c`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

cargo install tplay --features="mpv_0_35" --no-default-features

  --- stderr
  thread 'main' panicked at /home/micael/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ffmpeg-sys-next-6.0.1/build.rs:715:14:
  called `Result::unwrap()` on an `Err` value: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "pkg-config" "--libs" "--cflags" "libavutil"` did not exit successfully: exit status: 1
  error: could not find system library 'libavutil' required by the 'ffmpeg-sys-next' crate

  --- stderr
  Package libavutil was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libavutil.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'libavutil', required by 'virtual:world', not found

  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `tplay v0.4.5`, intermediate artifacts can be found at `/tmp/cargo-install0jgH9U`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Expected behavior It should be possible to install it.

Desktop (please complete the following information):

MicaelJarniac commented 7 months ago

Oh, I think I just needed to install the dependencies first. I thought they were just for development, and that for end users they would be automatically installed, or something like that. My bad.