[GH-ISSUE #13] cargo install spotify-tui fails on Ubuntu 19.10 #11

Closed
opened 2026-02-28 14:46:20 +03:00 by kerem · 3 comments
Owner

Originally created by @timburgess on GitHub (Oct 7, 2019).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/13

Hi. First time Rust user so excuse my naivety.

Running cargo install spotify-tui produces:

   ...
   Compiling idna v0.2.0
   Compiling idna v0.1.5
   Compiling want v0.2.0
error: failed to run custom build command for `openssl-sys v0.9.50`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installsXx3mo/release/build/openssl-sys-29b8e6cd7dd78066/build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
run pkg_config fail: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"`: No such file or directory (os error 2)"

--- stderr
thread 'main' panicked at '

Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
compilation process.

Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.

$HOST = x86_64-unknown-linux-gnu
$TARGET = x86_64-unknown-linux-gnu
openssl-sys = 0.9.50


It looks like you're compiling on Linux and also targeting Linux. Currently this
requires the `pkg-config` utility to find OpenSSL but unfortunately `pkg-config`
could not be found. If you have OpenSSL installed you can likely fix this by
installing `pkg-config`.

', /home/tim/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.50/build/find_normal.rs:150:5
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 `spotify-tui v0.4.0`, intermediate artifacts can be found at `/tmp/cargo-installsXx3mo`

Caused by:
  build failed

~/work via 🐍 3.6.2 took 3m 25s 
➜ sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libssl-dev is already the newest version (1.1.1c-1ubuntu4).
The following packages were automatically installed and are no longer required:
  apache2-utils authbind libapr1 libaprutil1 libecj-java libjaxb-api-java libjetty9-extra-java libjffi-java libjffi-jni libjnr-constants-java libjnr-enxio-java libjnr-ffi-java libjnr-posix-java libjnr-unixsocket-java libjnr-x86asm-java
  libspring-beans-java libspring-core-java libtaglibs-standard-impl-java libtaglibs-standard-spec-java
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

~/work via 🐍 3.6.2 
➜ openssl version
OpenSSL 1.1.1c  28 May 2019

Looking at https://github.com/sfackler/rust-openssl/issues/1164, it appears that openssl-sys v0.9.50 (which is in your dependency chain?) does not work with OpenSSL 1.1.1

Originally created by @timburgess on GitHub (Oct 7, 2019). Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/13 Hi. First time Rust user so excuse my naivety. Running `cargo install spotify-tui` produces: ``` ... Compiling idna v0.2.0 Compiling idna v0.1.5 Compiling want v0.2.0 error: failed to run custom build command for `openssl-sys v0.9.50` Caused by: process didn't exit successfully: `/tmp/cargo-installsXx3mo/release/build/openssl-sys-29b8e6cd7dd78066/build-script-main` (exit code: 101) --- stdout cargo:rustc-cfg=const_fn cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=OPENSSL_LIB_DIR OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset cargo:rerun-if-env-changed=OPENSSL_DIR OPENSSL_DIR unset run pkg_config fail: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"`: No such file or directory (os error 2)" --- stderr thread 'main' panicked at ' Could not find directory of OpenSSL installation, and this `-sys` crate cannot proceed without this knowledge. If OpenSSL is installed and this crate had trouble finding it, you can set the `OPENSSL_DIR` environment variable for the compilation process. Make sure you also have the development packages of openssl installed. For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora. If you're in a situation where you think the directory *should* be found automatically, please open a bug at https://github.com/sfackler/rust-openssl and include information about your system as well as this message. $HOST = x86_64-unknown-linux-gnu $TARGET = x86_64-unknown-linux-gnu openssl-sys = 0.9.50 It looks like you're compiling on Linux and also targeting Linux. Currently this requires the `pkg-config` utility to find OpenSSL but unfortunately `pkg-config` could not be found. If you have OpenSSL installed you can likely fix this by installing `pkg-config`. ', /home/tim/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.50/build/find_normal.rs:150:5 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 `spotify-tui v0.4.0`, intermediate artifacts can be found at `/tmp/cargo-installsXx3mo` Caused by: build failed ~/work via 🐍 3.6.2 took 3m 25s ➜ sudo apt-get install libssl-dev Reading package lists... Done Building dependency tree Reading state information... Done libssl-dev is already the newest version (1.1.1c-1ubuntu4). The following packages were automatically installed and are no longer required: apache2-utils authbind libapr1 libaprutil1 libecj-java libjaxb-api-java libjetty9-extra-java libjffi-java libjffi-jni libjnr-constants-java libjnr-enxio-java libjnr-ffi-java libjnr-posix-java libjnr-unixsocket-java libjnr-x86asm-java libspring-beans-java libspring-core-java libtaglibs-standard-impl-java libtaglibs-standard-spec-java Use 'sudo apt autoremove' to remove them. 0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade. ~/work via 🐍 3.6.2 ➜ openssl version OpenSSL 1.1.1c 28 May 2019 ``` Looking at https://github.com/sfackler/rust-openssl/issues/1164, it appears that openssl-sys v0.9.50 (which is in your dependency chain?) does not work with OpenSSL 1.1.1
kerem closed this issue 2026-02-28 14:46:20 +03:00
Author
Owner

@ghost commented on GitHub (Oct 7, 2019):

I solved this error using sudo apt install libssl-dev, followed by sudo apt install pkg-config

I'm running WSL through the Windows Terminal app, Ubuntu 18.04.3

<!-- gh-comment-id:539240665 --> @ghost commented on GitHub (Oct 7, 2019): I solved this error using `sudo apt install libssl-dev`, followed by `sudo apt install pkg-config` I'm running WSL through the Windows Terminal app, Ubuntu 18.04.3
Author
Owner

@timburgess commented on GitHub (Oct 7, 2019):

@nhuse9 Thanks! Adding pkg-config resolved it.

<!-- gh-comment-id:539249273 --> @timburgess commented on GitHub (Oct 7, 2019): @nhuse9 Thanks! Adding `pkg-config` resolved it.
Author
Owner

@jfvillablanca commented on GitHub (Nov 20, 2022):

I was missing libssl-dev. thank you!

<!-- gh-comment-id:1321040857 --> @jfvillablanca commented on GitHub (Nov 20, 2022): I was missing libssl-dev. thank you!
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/spotify-tui#11
No description provided.