Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to install with Cargo on Ubuntu 22.04 #31

Closed
saeedghsh opened this issue Oct 4, 2023 · 1 comment
Closed

Failed to install with Cargo on Ubuntu 22.04 #31

saeedghsh opened this issue Oct 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@saeedghsh
Copy link

saeedghsh commented Oct 4, 2023

Failed to install with Cargo on Ubuntu 22.04

Freshly installed Rust and Cargo via curl https://sh.rustup.rs -sSf | sh.
Then tried to install daktilo with the recommended command cargo install daktilo and failed.

Software information

  • Operating system: Ubuntu 22.04 (6.2.0-34-generic) operating with x11 (Waylad is disabled)
  • Rust version: rustc 1.72.1 (d5c2e9c34 2023-09-13)
  • Project version: daktilo v 0.2.0

Additional context

See full shell log
    Updating crates.io index
  Downloaded daktilo v0.2.0ning bytes: 268.1 KB                                                                                           
  Downloaded 1 crate (2.4 MB) in 1.23silo ...                                                                                             
  Installing daktilo v0.2.0
    Updating crates.io index
  Downloaded libflate_lz77 v1.2.0g bytes: 182.8 KB                                                                                        
  Downloaded dirs-sys v0.4.1aining bytes: 1.9 MB                                                                                          
  Downloaded dasp_sample v0.11.0ng bytes: 1.9 MB                                                                                          
  Downloaded equivalent v1.0.1ning bytes: 1.9 MB                                                                                          
  Downloaded nu-ansi-term v0.46.0g bytes: 1.8 MB                                                                                          
  Downloaded cfg-if v1.0.0emaining bytes: 1.8 MB                                                                                          
  Downloaded block-buffer v0.10.4g bytes: 1.8 MB                                                                                          
  Downloaded tokio-macros v2.1.0ng bytes: 5.9 MB                                                                                          
  Downloaded thiserror-impl v1.0.49bytes: 5.8 MB                                                                                          
  Downloaded roff v0.2.1 remaining bytes: 5.7 MB                                                                                          
  Downloaded num_cpus v1.16.0ining bytes: 5.6 MB                                                                                          
  Downloaded matchers v0.1.0aining bytes: 5.6 MB                                                                                          
  Downloaded cpufeatures v0.2.9ing bytes: 5.6 MB                                                                                          
  Downloaded bytes v1.5.0remaining bytes: 5.6 MB                                                                                          
  Downloaded parking_lot_core v0.9.8ytes: 5.6 MB                                                                                          
  Downloaded once_cell v1.18.0ning bytes: 7.0 MB                                                                                          
  Downloaded same-file v1.0.6ining bytes: 6.9 MB                                                                                          
  Downloaded proc-macro2 v1.0.67ng bytes: 6.9 MB                                                                                          
  Downloaded toml v0.8.2 remaining bytes: 8.1 MB                                                                                          
  Downloaded strsim v0.10.0maining bytes: 7.9 MB                                                                                          
  Downloaded lazy_static v1.4.0ng bytes: 7.9 MB                                                                                           
  Downloaded include-flate-codegen-exports v0.1.4                                                                                         
  Downloaded serde_spanned v0.6.3 bytes: 7.9 MB                                                                                           
  Downloaded option-ext v0.2.0ing bytes: 10.9 MB                                                                                          
  Downloaded toml_edit v0.20.2ing bytes: 10.9 MB                                                                                          
  Downloaded tracing v0.1.37ining bytes: 10.7 MB                                                                                          
  Downloaded thread_local v1.1.7g bytes: 10.6 MB                                                                                          
  Downloaded symphonia v0.5.3ning bytes: 10.6 MB                                                                                          
  Downloaded terminal_size v0.3.0 bytes: 10.6 MB                                                                                          
  Downloaded rust-embed-impl v8.0.0ytes: 10.6 MB                                                                                          
  Downloaded regex-automata v0.1.10ytes: 10.6 MB                                                                                          
  Downloaded anstyle v1.0.4aining bytes: 10.4 MB                                                                                          
  Downloaded clap_mangen v0.2.14g bytes: 10.2 MB                                                                                          
  Downloaded anstyle-query v1.0.0 bytes: 10.1 MB                                                                                          
  Downloaded toml_datetime v0.6.3 bytes: 10.1 MB                                                                                          
  Downloaded nix v0.24.3remaining bytes: 10.1 MB                                                                                          
  Downloaded rust-embed-utils v8.0.0tes: 9.7 MB                                                                                           
  Downloaded include-flate-codegen v0.1.49.6 MB                                                                                           
  Downloaded colorchoice v1.0.0ng bytes: 9.5 MB                                                                                           
  Downloaded is-terminal v0.4.9ng bytes: 9.3 MB                                                                                           
  Downloaded adler32 v1.2.0aining bytes: 9.2 MB                                                                                           
  Downloaded regex v1.9.6emaining bytes: 9.2 MB                                                                                           
  Downloaded heck v0.4.1remaining bytes: 8.9 MB                                                                                           
  Downloaded signal-hook-registry v1.4.1 8.7 MB                                                                                           
  Downloaded scopeguard v1.2.0ing bytes: 8.7 MB                                                                                           
  Downloaded quote v1.0.33maining bytes: 8.7 MB                                                                                           
  Downloaded pkg-config v0.3.27ng bytes: 8.7 MB                                                                                           
  Downloaded log v0.4.20remaining bytes: 8.7 MB                                                                                           
  Downloaded pin-project-lite v0.2.13es: 8.7 MB                                                                                           
  Downloaded rustix v0.38.17ining bytes: 8.6 MB                                                                                           
  Downloaded fastrand v2.0.1ining bytes: 8.5 MB                                                                                           
  Downloaded proc-macro-hack v0.5.20+deprecated                                                                                           
  Downloaded colored v2.0.4aining bytes: 8.4 MB                                                                                           
  Downloaded thiserror v1.0.49ing bytes: 8.3 MB                                                                                           
  Downloaded utf8parse v0.2.1ning bytes: 8.1 MB                                                                                           
  Downloaded serde_regex v1.1.0ng bytes: 8.1 MB                                                                                           
  Downloaded generic-array v0.14.7bytes: 8.1 MB                                                                                           
  Downloaded digest v0.10.7aining bytes: 8.0 MB                                                                                           
  Downloaded dirs v5.0.1remaining bytes: 7.9 MB                                                                                           
  Downloaded walkdir v2.4.0aining bytes: 7.7 MB                                                                                           
  Downloaded autocfg v1.1.0aining bytes: 7.7 MB                                                                                           
  Downloaded clap_lex v0.5.1ining bytes: 7.7 MB                                                                                           
  Downloaded anstream v0.6.4ining bytes: 7.7 MB                                                                                           
  Downloaded bitflags v1.3.2ining bytes: 7.7 MB                                                                                           
  Downloaded tracing-log v0.1.3ng bytes: 7.6 MB                                                                                           
  Downloaded version_check v0.9.4 bytes: 7.6 MB                                                                                           
  Downloaded clap_derive v4.4.2ng bytes: 7.6 MB                                                                                           
  Downloaded arrayvec v0.7.4ining bytes: 7.5 MB                                                                                           
  Downloaded tokio v1.32.0maining bytes: 7.4 MB                                                                                           
  Downloaded smallvec v1.11.1cting tokio ...                                                                                              
  Downloaded sha2 v0.10.8emaining bytes: 7.0 MB                                                                                           
  Downloaded rdev v0.5.3remaining bytes: 7.0 MB                                                                                           
  Downloaded overload v0.1.1ining bytes: 7.0 MB                                                                                           
  Downloaded rodio v0.17.1maining bytes: 7.0 MB                                                                                           
  Downloaded alsa-sys v0.3.1ining bytes: 7.0 MB                                                                                           
  Downloaded symphonia-metadata v0.5.3s: 6.7 MB                                                                                           
  Downloaded lock_api v0.4.10ning bytes: 6.7 MB                                                                                           
  Downloaded aho-corasick v1.1.1g bytes: 6.7 MB                                                                                           
  Downloaded errno v0.3.4emaining bytes: 6.7 MB                                                                                           
  Downloaded bitflags v2.4.0ining bytes: 6.5 MB                                                                                           
  Downloaded crc32fast v1.3.2ning bytes: 6.5 MB                                                                                           
  Downloaded bytemuck v1.14.0ning bytes: 6.3 MB                                                                                           
  Downloaded crypto-common v0.1.6 bytes: 6.2 MB                                                                                           
  Downloaded anstyle-parse v0.2.2 bytes: 6.2 MB                                                                                           
  Downloaded parking_lot v0.12.1g bytes: 6.2 MB                                                                                           
  Downloaded sharded-slab v0.1.6g bytes: 6.2 MB                                                                                           
  Downloaded unicode-ident v1.0.12bytes: 6.2 MB                                                                                           
  Downloaded linux-raw-sys v0.4.8 bytes: 6.0 MB                                                                                           
  Downloaded clap_complete v4.4.3g linux-raw-sys ...                                                                                      
  Downloaded tracing-core v0.1.31 bytes: 5.8 MB                                                                                           
  Downloaded clap v4.4.6remaining bytes: 5.8 MB                                                                                           
  Downloaded tracing-attributes v0.1.26: 5.7 MB                                                                                           
  Downloaded libflate v1.4.0ining bytes: 5.7 MB                                                                                           
  Downloaded indexmap v2.0.2ining bytes: 5.6 MB                                                                                           
  Downloaded typenum v1.17.0ining bytes: 5.6 MB                                                                                           
  Downloaded symphonia-bundle-mp3 v0.5.3 5.6 MB                                                                                           
  Downloaded serde_derive v1.0.188bytes: 5.6 MB                                                                                           
  Downloaded rle-decode-fast v1.0.3ytes: 5.5 MB                                                                                           
  Downloaded serde v1.0.188aining bytes: 5.5 MB                                                                                           
  Downloaded x11 v2.21.0remaining bytes: 5.5 MB                                                                                           
  Downloaded socket2 v0.5.4aining bytes: 5.4 MB                                                                                           
  Downloaded alsa v0.7.1remaining bytes: 5.4 MB                                                                                           
  Downloaded memchr v2.6.4maining bytes: 5.2 MB                                                                                           
  Downloaded mio v0.8.8 remaining bytes: 4.7 MB                                                                                           
  Downloaded cpal v0.15.2emaining bytes: 4.7 MB                                                                                           
  Downloaded symphonia-core v0.5.3bytes: 4.6 MB                                                                                           
  Downloaded hashbrown v0.14.1ing bytes: 4.6 MB                                                                                           
  Downloaded winnow v0.5.15aining bytes: 4.2 MB                                                                                           
  Downloaded clap_builder v4.4.6g bytes: 4.0 MB                                                                                           
  Downloaded tracing-subscriber v0.3.17: 3.8 MB                                                                                           
  Downloaded syn v1.0.109maining bytes: 3.4 MB                                                                                            
  Downloaded syn v2.0.37emaining bytes: 3.1 MB                                                                                            
  Downloaded regex-syntax v0.6.29bytes: 3.1 MB                                                                                            
  Downloaded regex-syntax v0.7.5 bytes: 2.8 MB                                                                                            
  Downloaded regex-automata v0.3.9ytes: 1.8 MB                                                                                            
  Downloaded libc v0.2.148aining bytes: 953.9 KB                                                                                          
  Downloaded rust-embed v8.0.0ng bytes: 648.0 KB                                                                                          
  Downloaded include-flate v0.2.0 rust-embed ...                                                                                          
  Downloaded encoding_rs v0.8.33 include-flate ...                                                                                        
  Downloaded 119 crates (12.6 MB) in 4.19s (largest was `linux-raw-sys` at 1.4 MB)                                                        
   Compiling proc-macro2 v1.0.67
   Compiling unicode-ident v1.0.12
   Compiling cfg-if v1.0.0
   Compiling typenum v1.17.0
   Compiling libc v0.2.148
   Compiling version_check v0.9.4
   Compiling lazy_static v1.4.0
   Compiling crc32fast v1.3.2
   Compiling pkg-config v0.3.27          ] 0/171: crc32fast(build.rs), libc(build.rs), proc-macro2(build.rs), version_check, typenum(bu...
   Compiling rustix v0.38.17             ] 2/171: crc32fast(build.rs), libc(build.rs), proc-macro2(build.rs), version_check, typenum(bu...
   Compiling bitflags v1.3.2             ] 3/171: crc32fast(build.rs), libc(build.rs), proc-macro2(build.rs), version_check, typenum(bu...
   Compiling bitflags v2.4.0             ] 4/171: crc32fast(build.rs), libc(build.rs), proc-macro2(build.rs), version_check, typenum(bu...
   Compiling generic-array v0.14.7       ] 5/171: crc32fast(build.rs), libc(build.rs), proc-macro2(build.rs), version_check, typenum(bu...
   Compiling linux-raw-sys v0.4.8        ] 6/171: crc32fast(build.rs), libc(build.rs), proc-macro2(build.rs), typenum(build.rs), rustix...
   Compiling serde v1.0.188              ] 7/171: crc32fast(build.rs), libc(build.rs), proc-macro2(build.rs), typenum(build.rs), rustix...
   Compiling log v0.4.20                ] 17/171: libc, typenum(build), typenum(build), serde(build.rs), generic-array(build), proc-mac...
   Compiling autocfg v1.1.0             ] 19/171: libc, typenum, typenum(build), serde(build.rs), proc-macro2, pkg-config, linux-raw-sy...
   Compiling rle-decode-fast v1.0.3     ] 23/171: libc, typenum, crc32fast(build), proc-macro2, typenum, autocfg, linux-raw-sys, log      
   Compiling utf8parse v0.2.1           ] 24/171: libc, typenum, rle-decode-fast, proc-macro2, typenum, autocfg, linux-raw-sys, log       
   Compiling proc-macro-hack v0.5.20+deprecated1: libc, typenum, utf8parse, proc-macro2, rustix, typenum, autocfg, linux-raw-sys          
   Compiling quote v1.0.33              ] 27/171: libc, typenum, proc-macro-hack(build.rs), proc-macro2, rustix, typenum, autocfg, linu...
   Compiling lock_api v0.4.10           ] 28/171: libc, typenum, proc-macro-hack(build.rs), proc-macro2, rustix, typenum, autocfg, quote  
   Compiling syn v2.0.37                ] 29/171: libc, typenum, proc-macro-hack(build.rs), proc-macro2, rustix, typenum, lock_api(buil...
   Compiling syn v1.0.109               ] 30/171: libc, typenum, proc-macro2, rustix, syn, typenum, lock_api(build.rs), quote             
   Compiling smallvec v1.11.1           ] 31/171: libc, typenum, proc-macro2, rustix, syn, typenum, quote, syn(build.rs)                  
   Compiling parking_lot_core v0.9.8    ] 32/171: libc, typenum, smallvec, rustix, syn, typenum, quote, syn(build.rs)                     
   Compiling anstyle-parse v0.2.2       ] 37/171: libc, proc-macro-hack(build), generic-array, rustix, syn, generic-array, parking_lot_...
   Compiling libflate_lz77 v1.2.0       ] 39/171: libc, parking_lot_core(build), generic-array, anstyle-parse, rustix, syn, generic-arr...
   Compiling alsa-sys v0.3.1            ] 42/171: libc, generic-array, anstyle-parse, libflate_lz77, crc32fast, rustix, syn, generic-array
   Compiling arrayvec v0.7.4            ] 43/171: libc, generic-array, alsa-sys(build.rs), libflate_lz77, crc32fast, rustix, syn, gener...
   Compiling anstyle-query v1.0.0       ] 44/171: libc, generic-array, alsa-sys(build.rs), libflate_lz77, rustix, syn, generic-array, a...
   Compiling memchr v2.6.4              ] 45/171: libc, anstyle-query, generic-array, alsa-sys(build.rs), rustix, syn, generic-array, a...
   Compiling bytemuck v1.14.0           ] 46/171: libc, generic-array, alsa-sys(build.rs), memchr, rustix, syn, generic-array, arrayvec   
   Compiling block-buffer v0.10.4       ] 47/171: libc, generic-array, memchr, rustix, syn, bytemuck, generic-array, arrayvec             
   Compiling crypto-common v0.1.6       ] 48/171: libc, generic-array, block-buffer, memchr, rustix, syn, bytemuck, generic-array         
   Compiling colorchoice v1.0.0         ] 49/171: libc, generic-array, block-buffer, crypto-common, memchr, syn, bytemuck, generic-array  
   Compiling anstyle v1.0.4             ] 50/171: libc, generic-array, block-buffer, crypto-common, memchr, syn, bytemuck, colorchoice    
   Compiling scopeguard v1.2.0          ] 51/171: libc, anstyle, generic-array, block-buffer, crypto-common, memchr, syn, bytemuck        
   Compiling adler32 v1.2.0             ] 52/171: libc, anstyle, scopeguard, block-buffer, crypto-common, memchr, syn, bytemuck           
   Compiling once_cell v1.18.0          ] 53/171: libc, anstyle, scopeguard, block-buffer, adler32, memchr, syn, bytemuck                 
   Compiling symphonia-core v0.5.3      ] 55/171: libc, anstyle, lock_api, adler32, memchr, syn, bytemuck, once_cell                      
   Compiling libflate v1.4.0            ] 56/171: libc, anstyle, lock_api, adler32, memchr, syn, once_cell, symphonia-core                
   Compiling anstream v0.6.4            ] 57/171: libc, anstyle, lock_api, libflate, memchr, syn, once_cell, symphonia-core               
   Compiling digest v0.10.7             ] 58/171: libc, anstyle, lock_api, libflate, anstream, memchr, syn, symphonia-core                
   Compiling aho-corasick v1.1.1        ] 61/171: libflate, anstream, crypto-common, memchr, digest, syn, block-buffer, symphonia-core    
error: failed to run custom build command for `alsa-sys v0.3.1`d), libflate, anstream, parking_lot_core, memchr, syn, aho-corasick, sym...

Caused by:
  process didn't exit successfully: `/tmp/cargo-install0p32LC/release/build/alsa-sys-d0be25b49ac25f37/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=ALSA_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=ALSA_STATIC
  cargo:rerun-if-env-changed=ALSA_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at '`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
  No package 'alsa' found
  ', ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alsa-sys-0.3.1/build.rs:13:18
  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 `daktilo v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-install0p32LC`.                             
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
@saeedghsh saeedghsh added the bug Something isn't working label Oct 4, 2023
@orhun
Copy link
Owner

orhun commented Oct 5, 2023

Please install the required packages mentioned here.

sudo apt-get update
sudo apt-get install \
  libasound2-dev \
  libxi-dev \
  libxtst-dev \
  pkg-config

@orhun orhun closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants