Wie man cargo build Fehler behebt: The system library required by crate was not found.
Problem
Beim Erstellen eines Rust-Projekts mit Cargo kannst du einen Fehler wie diesen erhalten:
cargo_libpcsclite_hint.sh
The system library `libpcsclite` required by crate `pcsc-sys` was not found.
The file `libpcsclite.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
The PKG_CONFIG_PATH environment variable is not set.Lösung
Die Lösung befindet sich unter der Fehlermeldung in der cargo-Ausgabe. Abhängig von deiner Linux-Distribution musst du das entsprechende Entwicklungspaket installieren, das die libpcsclite.pc-Datei bereitstellt.
cargo_libpcsclite_hint.sh
HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `libpcsclite.pc`.
If you are using Debian (or a derivative), try:
$ sudo apt install pkgconf libpcsclite-dev
If you are using Arch (or a derivative), try:
$ sudo pacman -S pkgconf pcsclite
If you are using Fedora (or a derivative), try:
$ sudo dnf install pkgconf pcsc-lite-develÄhnliche Beiträge nach Kategorie:
Rust
Wenn dieser Beitrag dir geholfen hat, erwäge, mir einen Kaffee zu spendieren oder per PayPal zu spenden, um die Recherche und Veröffentlichung neuer Beiträge auf TechOverflow zu unterstützen