Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
30 views
Kate fails to launch openscad-lsp, I think that it's because cargo can't install it
So I'm toying around with scad files. When I open them on Kate I get this error: [10:55:26  LSP Client Warning] Failed to find server binary: openscad-lsp Please check your PATH for the binary See also https://github.com/Leathong/openscad-LSP for installation or details I got to the github link, an...
So I'm toying around with scad files. When I open them on Kate I get this error: [10:55:26  LSP Client Warning] Failed to find server binary: openscad-lsp Please check your PATH for the binary See also https://github.com/Leathong/openscad-LSP for installation or details I got to the github link, and there I see that to install `openscad-lsp I need to have cargo installed. I install this, with build-essential as well and I try to install openscad-lsp` and I get the long output below that to me reads like "there was a problem" and doesn't give any concrete information (as in, there is no specific package that failed to be installed). My knowledge about rust (which I understand is the programming/scripting language) is 0, so I'm left helpless here. Any of you has an idea how I can fix this? yotam@poorThing:~$ cargo install openscad-lsp Updating crates.io index Downloaded openscad-lsp v1.3.1 Downloaded 1 crate (60.3 KB) in 1.37s Installing openscad-lsp v1.3.1 Updating crates.io index Locking 101 packages to latest compatible versions Adding bitflags v1.3.2 (latest: v2.9.1) Adding getrandom v0.2.16 (latest: v0.3.3) Adding lsp-types v0.94.1 (latest: v0.97.0) Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.14.2+wasi-0.2.4) Adding windows-targets v0.52.6 (latest: v0.53.0) Adding windows_aarch64_gnullvm v0.52.6 (latest: v0.53.0) Adding windows_aarch64_msvc v0.52.6 (latest: v0.53.0) Adding windows_i686_gnu v0.52.6 (latest: v0.53.0) Adding windows_i686_gnullvm v0.52.6 (latest: v0.53.0) Adding windows_i686_msvc v0.52.6 (latest: v0.53.0) Adding windows_x86_64_gnu v0.52.6 (latest: v0.53.0) Adding windows_x86_64_gnullvm v0.52.6 (latest: v0.53.0) Adding windows_x86_64_msvc v0.52.6 (latest: v0.53.0) Downloaded anstyle-query v1.1.2 Downloaded tree-sitter-language v0.1.5 Downloaded equivalent v1.0.2 Downloaded zerofrom v0.1.6 Downloaded stable_deref_trait v1.2.0 Downloaded strsim v0.11.1 Downloaded bitflags v1.3.2 Downloaded anstyle v1.0.10 Downloaded anstyle-parse v0.2.6 Downloaded dirs v6.0.0 Downloaded zerofrom-derive v0.1.6 Downloaded clap_lex v0.7.4 Downloaded dirs-sys v0.5.0 Downloaded serde_repr v0.1.20 Downloaded form_urlencoded v1.2.1 Downloaded shlex v1.3.0 Downloaded colorchoice v1.0.3 Downloaded zerovec-derive v0.11.1 Downloaded idna_adapter v1.2.1 Downloaded streaming-iterator v0.1.9 Downloaded utf8parse v0.2.2 Downloaded potential_utf v0.1.2 Downloaded lazy_static v1.5.0 Downloaded itoa v1.0.15 Downloaded option-ext v0.2.0 Downloaded percent-encoding v2.3.1 Downloaded linked-hash-map v0.5.6 Downloaded heck v0.5.0 Downloaded lsp-server v0.7.8 Downloaded yoke-derive v0.8.0 Downloaded utf8_iter v1.0.4 Downloaded is_terminal_polyfill v1.70.1 Downloaded synstructure v0.13.2 Downloaded anstream v0.6.18 Downloaded quote v1.0.40 Downloaded yoke v0.8.0 Downloaded displaydoc v0.2.5 Downloaded shellexpand v3.1.1 Downloaded tree-sitter-openscad-ng v0.6.0 Downloaded litemap v0.8.0 Downloaded writeable v0.6.1 Downloaded tinystr v0.8.1 Downloaded directories v6.0.0 Downloaded smallvec v1.15.0 Downloaded crossbeam-utils v0.8.21 Downloaded clap_derive v4.5.32 Downloaded log v0.4.27 Downloaded icu_normalizer v2.0.0 Downloaded unicode-ident v1.0.18 Downloaded serde_derive v1.0.219 Downloaded ryu v1.0.20 Downloaded proc-macro2 v1.0.95 Downloaded clap v4.5.38 Downloaded url v2.5.4 Downloaded icu_properties v2.0.1 Downloaded memchr v2.7.4 Downloaded zerotrie v0.2.2 Downloaded indexmap v2.9.0 Downloaded zerovec v0.11.2 Downloaded idna v1.0.3 Downloaded hashbrown v0.15.3 Downloaded tree-sitter v0.25.4 Downloaded aho-corasick v1.1.3 Downloaded serde_json v1.0.140 Downloaded icu_properties_data v2.0.1 Downloaded clap_builder v4.5.38 Downloaded syn v2.0.101 Downloaded regex v1.11.1 Downloaded regex-syntax v0.8.5 Downloaded crossbeam-channel v0.5.15 Downloaded icu_locale_core v2.0.0 Downloaded icu_collections v2.0.0 Downloaded serde v1.0.219 Downloaded cc v1.2.24 Downloaded lsp-types v0.94.1 Downloaded icu_provider v2.0.0 Downloaded icu_normalizer_data v2.0.0 Downloaded regex-automata v0.4.9 Downloaded tree-sitter-traversal2 v0.2.1 Downloaded libc v0.2.172 Downloaded 80 crates (5.8 MB) in 1.56s error: failed to compile openscad-lsp v1.3.1, intermediate artifacts can be found at /tmp/cargo-install9QolOI. To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path. Caused by: rustc 1.80.1 is not supported by the following packages: icu_collections@2.0.0 requires rustc 1.82 icu_locale_core@2.0.0 requires rustc 1.82 icu_normalizer@2.0.0 requires rustc 1.82 icu_normalizer_data@2.0.0 requires rustc 1.82 icu_normalizer_data@2.0.0 requires rustc 1.82 icu_normalizer_data@2.0.0 requires rustc 1.82 icu_properties@2.0.1 requires rustc 1.82 icu_properties_data@2.0.1 requires rustc 1.82 icu_properties_data@2.0.1 requires rustc 1.82 icu_properties_data@2.0.1 requires rustc 1.82 icu_provider@2.0.0 requires rustc 1.82 idna_adapter@1.2.1 requires rustc 1.82 litemap@0.8.0 requires rustc 1.82 potential_utf@0.1.2 requires rustc 1.81 tinystr@0.8.1 requires rustc 1.81 writeable@0.6.1 requires rustc 1.81 yoke@0.8.0 requires rustc 1.81 zerofrom@0.1.6 requires rustc 1.81 zerotrie@0.2.2 requires rustc 1.82 zerovec@0.11.2 requires rustc 1.82 Try re-running cargo install with --locked yotam@poorThing:~$ cargo install --locked openscad-lsp
Yotam (2744 rep)
May 24, 2025, 07:59 AM • Last activity: May 24, 2025, 08:11 AM
6 votes
3 answers
3233 views
Rustup-installed Rust on Fedora: Unable to find Libudev.pc
I'm trying to build a rust app on fedora within a rustup environment that depends on libudev. At the moment I get the error when trying to compile the app with `cargo build --release`: ``` error: failed to run custom build command for `libudev-sys v0.1.4` Caused by: process didn't exit successfully:...
I'm trying to build a rust app on fedora within a rustup environment that depends on libudev. At the moment I get the error when trying to compile the app with cargo build --release:
error: failed to run custom build command for libudev-sys v0.1.4

Caused by:
  process didn't exit successfully: /home/me/myApp/target/release/build/libudev-sys-7d615f10fc24f9b2/build-script-build (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBUDEV_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=LIBUDEV_STATIC
  cargo:rerun-if-env-changed=LIBUDEV_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 'called Result::unwrap() on an Err value: "\"pkg-config\" \"--libs\" \"--cflags\" \"libudev\" did not exit successfully: exit status: 1\n--- stderr\nPackage libudev was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libudev.pc'\nto the PKG_CONFIG_PATH environment variable\nPackage 'libudev', required by 'virtual:world', not found\n"', /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/libudev-sys-0.1.4/build.rs:38:41
In the past things worked fine on ubuntu (or any debian-based, using the system rust install not rustup) after doing sudo apt install libudev1 && sudo apt install libudev-dev. So far, I've tried or considered: - looking at the advice in https://unix.stackexchange.com/questions/715215/unable-to-find-libudev-pc , most of that advice was particular to someone's homebrew / linuxbrew setup while this question is specific to Fedora with a Rustup installed rust environment. - Tried updating my PKG_CONFIG_PATH and checking things with PKG_CONFIG, specifically: 1. See where the libraries are via yum provides */libudev.pc, which reveals Filename : /usr/lib/pkgconfig/libudev.pc & Filename : /usr/lib64/pkgconfig/libudev.pc 2. Add the lib folders to PKG_CONFIG_PATH in my .bashrc: PKG_CONFIG_PATH=$PATH:/usr/lib/pkgconfig/:/usr/lib64/pkgconfig 3. Start a new shell, run pkg-config --libs --cflags libudev , which still gives an error
Package libudev was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libudev.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'libudev', required by 'virtual:world', not found
4. Running pkg-config --variable pc_path pkg-config shows /usr/lib64/pkgconfig:/usr/share/pkgconfig - considered doing sudo dnf install libudev , but hesitate since I'm using a rustup environment instead and installing that triggers installing the fedora system version of rust too.
Vivek Gani (233 rep)
Nov 7, 2022, 05:48 PM • Last activity: Apr 15, 2025, 06:42 PM
0 votes
1 answers
290 views
Getting Rust in QNX
I saw this article on the blackberry site https://blogs.blackberry.com/en/2023/02/this-is-the-kind-of-rust-the-automotive-industry-needs Do anyone know if this is available yet? Even as a preview package or similar? I would very much like to try it out. So if it is possible to download and install i...
I saw this article on the blackberry site https://blogs.blackberry.com/en/2023/02/this-is-the-kind-of-rust-the-automotive-industry-needs Do anyone know if this is available yet? Even as a preview package or similar? I would very much like to try it out. So if it is possible to download and install in a QNX 7.x or CAR3 environment, I would be very happy if someone could give me some pointers how to do that.
mattsson (113 rep)
Oct 12, 2023, 03:17 PM • Last activity: Oct 2, 2024, 08:48 AM
0 votes
1 answers
2634 views
Docker File Error no such file or directory: unknown
Trying to build a pkt miner image in order to deploy to akash. Keep getting this error ``` Error invoking remote method 'docker-start-container': Error: (HTTP code 400) unexpected - OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "./target/release/packetcr...
Trying to build a pkt miner image in order to deploy to akash. Keep getting this error
Error invoking remote method 'docker-start-container': Error: (HTTP code 400) unexpected - OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "./target/release/packetcrypt": stat ./target/release/packetcrypt: no such file or directory: unknown
My Dockerfile
FROM ubuntu:20.04

RUN apt-get update

RUN apt-get install -y \
    build-essential \
    curl

RUN apt-get update

RUN curl -y --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs  | sh

RUN apt install make

RUN apt-get -y update

RUN apt-get -y install gcc git 

RUN apt-get -y update

RUN git clone https://github.com/cjdelisle/packetcrypt_rs 

ENV PATH=$PATH:/usr/local/packetcrypt_RS

CMD [ "~/", ".cargo/bin/cargo", "build", "--release" ]

CMD [ "./target/release/packetcrypt", "ann", "-p", "pkt1qd5skpmelkwvzy5vppqhafvmx0n5kqy97eglp00", "http://pool.pkteer.com " ]
joseph (1 rep)
May 15, 2021, 05:44 AM • Last activity: May 29, 2024, 06:05 AM
3 votes
1 answers
855 views
How to keep a script running persistently in background
Currently I launch my UDP BitTorrent tracker using the command ` ./target/release/aquatic_udp -c "aquatic-udp-config.toml"` the app shuts down when I close the console. What is the preferred way of keeping the script running persistently in the background? ChatGPT recommends either `nohup ./target/r...
Currently I launch my UDP BitTorrent tracker using the command ./target/release/aquatic_udp -c "aquatic-udp-config.toml" the app shuts down when I close the console. What is the preferred way of keeping the script running persistently in the background? ChatGPT recommends either nohup ./target/release/aquatic_udp -c "aquatic-udp-config.toml" & or systemd sudo nano /etc/systemd/system/aquatic_udp.service
[Unit]
Description=Aquatic UDP BitTorrent Tracker
After=network.target

[Service]
Type=simple
ExecStart=/path/to/target/release/aquatic_udp -c "/path/to/aquatic-udp-config.toml"
Restart=on-failure

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start aquatic_udp.service
sudo systemctl enable aquatic_udp.service
or using screen or tmux. While I'm sure that these will 'work' I'm curious about what knowledgeable people would recommend or what is most suitable for this type of scenario. My gut tells me systemd is probably the best method for a long term / stability approach?
skarz (131 rep)
Apr 30, 2024, 02:26 PM • Last activity: Apr 30, 2024, 02:33 PM
0 votes
2 answers
200 views
How to ask for root password from the user for my GUI app which pipes it to makepkg?
I was learning rust. I am building a simple GUI application that scrapes through aur and installs a package. I am using tauri for GUI. So, to install an aur application, I will run `makepkg -si` inside the package directory. But, it asks for root password in the middle of installation. After searchi...
I was learning rust. I am building a simple GUI application that scrapes through aur and installs a package. I am using tauri for GUI. So, to install an aur application, I will run makepkg -si inside the package directory. But, it asks for root password in the middle of installation. After searching web, I came to know, I can use pkexec to ask password graphically but pkexec is like using sudo and running makepkg as sudo is not allowed. Any idea of what should I do? Are there any articles where I can look into ?
Yashas S Nadig (3 rep)
Feb 10, 2024, 01:34 PM • Last activity: Feb 19, 2024, 10:56 AM
-1 votes
1 answers
1158 views
How much of the Linux kernel is currently coded in rust?
Its a curiosity thing, but I would like to know How much of the Linux kernel is currently coded in rust ? I means in percent, and if you known it which part ? is there only drivers or is it real part of the kernel in pure rust ? NB : from the github.com/torvalds/linux page there is a statistic that...
Its a curiosity thing, but I would like to know How much of the Linux kernel is currently coded in rust ? I means in percent, and if you known it which part ? is there only drivers or is it real part of the kernel in pure rust ? NB : from the github.com/torvalds/linux page there is a statistic that report no rust. C 98.3% Assembly 0.7% Shell 0.4% Makefile 0.2% Python 0.2% Perl 0.1% Other 0.1%
dominix (795 rep)
Feb 8, 2024, 11:15 PM • Last activity: Feb 9, 2024, 08:39 AM
2 votes
1 answers
485 views
can't install gnuplot
I am using gnuplot and Rust for a project on my Linux Mint (cinnamon) PC. However once I try to display a picture I get: ``` called `Result::unwrap()` on an `Err` value: Couldn't spawn gnuplot. Make sure it is installed and available in PATH. Cause: No such file or directory (os error 2) ``` This se...
I am using gnuplot and Rust for a project on my Linux Mint (cinnamon) PC. However once I try to display a picture I get:
called Result::unwrap() on an Err value: Couldn't spawn gnuplot. Make sure it is installed and available in PATH.
Cause: No such file or directory (os error 2)
This seems ok as I haven't downloaded Gnuplot. However once i run
sudo apt install gnuplot
I get
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package gnuplot-x11 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
and I have no idea what I should do now. Any help is apreciated, thanks EDIT: I already ran
apt update
and apt policy returns
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://packages.microsoft.com/repos/code  stable/main armhf Packages
     release o=code stable,a=stable,n=stable,l=code stable,c=main,b=armhf
     origin packages.microsoft.com
 500 http://packages.microsoft.com/repos/code  stable/main arm64 Packages
     release o=code stable,a=stable,n=stable,l=code stable,c=main,b=arm64
     origin packages.microsoft.com
 500 http://packages.microsoft.com/repos/code  stable/main amd64 Packages
     release o=code stable,a=stable,n=stable,l=code stable,c=main,b=amd64
     origin packages.microsoft.com
 500 http://security.ubuntu.com/ubuntu  jammy-security/multiverse i386 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=multiverse,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu  jammy-security/multiverse amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=multiverse,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu  jammy-security/universe i386 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=universe,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu  jammy-security/universe amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=universe,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu  jammy-security/restricted i386 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=restricted,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu  jammy-security/restricted amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=restricted,b=amd64
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu  jammy-security/main i386 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=main,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu  jammy-security/main amd64 Packages
     release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=main,b=amd64
     origin security.ubuntu.com
 500 https://mirror.init7.net/linuxmint  vera/backport i386 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=backport,b=i386
     origin mirror.init7.net
 500 https://mirror.init7.net/linuxmint  vera/backport amd64 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=backport,b=amd64
     origin mirror.init7.net
 500 https://mirror.init7.net/linuxmint  vera/import i386 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=import,b=i386
     origin mirror.init7.net
 500 https://mirror.init7.net/linuxmint  vera/import amd64 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=import,b=amd64
     origin mirror.init7.net
 700 https://mirror.init7.net/linuxmint  vera/upstream i386 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=upstream,b=i386
     origin mirror.init7.net
 700 https://mirror.init7.net/linuxmint  vera/upstream amd64 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=upstream,b=amd64
     origin mirror.init7.net
 500 https://mirror.init7.net/linuxmint  vera/main i386 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=main,b=i386
     origin mirror.init7.net
 500 https://mirror.init7.net/linuxmint  vera/main amd64 Packages
     release v=21.1,o=linuxmint,a=vera,n=vera,l=linuxmint,c=main,b=amd64
     origin mirror.init7.net
 500 https://dl.google.com/linux/chrome/deb  stable/main amd64 Packages
     release v=1.0,o=Google LLC,a=stable,n=stable,l=Google,c=main,b=amd64
     origin dl.google.com
 500 https://cli.github.com/packages  stable/main amd64 Packages
     release o=gh,n=stable,l=gh,c=main,b=amd64
     origin cli.github.com
 500 http://security.ubuntu.com/ubuntu  focal-security/main i386 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=main,b=i386
     origin security.ubuntu.com
 500 http://security.ubuntu.com/ubuntu  focal-security/main amd64 Packages
     release v=20.04,o=Ubuntu,a=focal-security,n=focal,l=Ubuntu,c=main,b=amd64
     origin security.ubuntu.com
 500 https://apt.kitware.com/ubuntu  focal/main i386 Packages
     release o=ubuntu focal,a=focal,n=focal,l=ubuntu focal,c=main,b=i386
     origin apt.kitware.com
 500 https://apt.kitware.com/ubuntu  focal/main amd64 Packages
     release o=ubuntu focal,a=focal,n=focal,l=ubuntu focal,c=main,b=amd64
     origin apt.kitware.com
 500 https://cloud.r-project.org/bin/linux/ubuntu  bionic-cran40/ Packages
     release v=18.04,o=CRAN,a=bionic-cran40,n=bionic-cran40,l=CRAN,c=
     origin cloud.r-project.org
Pinned packages:
     snapd -> 2.58+22.04.1 with priority -10
     snapd -> 2.58+20.04.1 with priority -10
Beppe (23 rep)
Jan 30, 2024, 02:04 PM • Last activity: Jan 30, 2024, 02:39 PM
1 votes
1 answers
1486 views
libudev not found in pkg-config search path in GitHub actions ubuntu-latest environment
I'm setting up CI for a Rust application I'm developing that (indirectly) depends on the `libudev-sys` crate. Part of this CI means building my crate, which means also building `libudev-sys`. When the workflow runs and it gets to the build stage, cargo fails with this error message while attempting...
I'm setting up CI for a Rust application I'm developing that (indirectly) depends on the libudev-sys crate. Part of this CI means building my crate, which means also building libudev-sys. When the workflow runs and it gets to the build stage, cargo fails with this error message while attempting to build libudev-sys:
thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-sys-0.1.4/build.rs:38:41:
  called Result::unwrap() on an Err value:
  PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "pkg-config" "--libs" "--cflags" "libudev" did not exit successfully: exit status: 1
  error: could not find system library 'libudev' required by the 'libudev-sys' crate
Package libudev was not found in the pkg-config search path.
Perhaps you should add the directory containing `libudev.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libudev' found
  note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
I'm struggling to debug this because every change requires committing and pushing to the repo and then waiting for the workflow to run. This is not an error encountered on my own system. According to this page about the ubuntu-latest environment , systemd is installed (which provides libudev), as well as pkg-config from apt (so [this answer] in a related question doesn't apply). I have tried installing systemd with sudo apt-get update and sudo apt-get install systemd, but that shows that systemd is already installed. I also tried updating the PKG_CONFIG_PATH as per this answer , but this did not work either.
Zoe (41 rep)
Nov 18, 2023, 02:04 AM • Last activity: Nov 18, 2023, 02:24 AM
1 votes
1 answers
458 views
Hidraw doesn't find device without device-specific kernel driver being loaded
I'm trying to make a userspace Linux program that talks to a Bluetooth HID device, specifically the [Wii remote][1]. When the `hid-wiimote` kernel module is loaded, I can use the [hidapi][2] library (with the `linux-static-hidraw` backend) to talk to the device directly, but the kernel driver does p...
I'm trying to make a userspace Linux program that talks to a Bluetooth HID device, specifically the Wii remote . When the hid-wiimote kernel module is loaded, I can use the hidapi library (with the linux-static-hidraw backend) to talk to the device directly, but the kernel driver does periodic polling and changes the operation mode often. When I blacklist the module in /etc/modprobe.d, the LEDs on the controller flash forever and the library returns this error: > No HID devices with requested VID/PID found in the system. I'm pretty sure I've set up the udev permissions properly, here's my custom rule file:
KERNEL=="hidraw*", KERNELS=="0005:057E:*.*", MODE="0666"
For reference, here's my minimal Rust example:
/**
 * [dependencies]
 * hidapi = { version = "2.4.0", default-features = false, features = ["linux-static-hidraw"] }
 */

use hidapi::HidApi;

fn main() {
    let hid = HidApi::new().unwrap();
    let wiimote = hid.open(0x057e, 0x0306).unwrap(); // error if hid-wiimote isn't loaded
}
Honbra (21 rep)
Jul 21, 2023, 04:22 PM • Last activity: Sep 17, 2023, 02:28 PM
1 votes
0 answers
704 views
How to install LLVM-14 on Ubuntu?
I have installed LLVM-14 on Ubuntu manually. Everything seems to work fine except `ld` during the compilation of `cargo-bpf` in Rust cargo. ``` = note: /usr/bin/ld: cannot find -lLLVM-14 collect2: error: ld returned 1 exit status error: could not compile `cargo-bpf` (bin "cargo-bpf") due to previous...
I have installed LLVM-14 on Ubuntu manually. Everything seems to work fine except ld during the compilation of cargo-bpf in Rust cargo.
= note: /usr/bin/ld: cannot find -lLLVM-14
          collect2: error: ld returned 1 exit status
          

error: could not compile cargo-bpf (bin "cargo-bpf") due to previous error
Output of llvm-config --version
root@ip-172-31-0-42:/opt/llvm/cs-fw# llvm-config --version
14.0.0
LLVM path: /opt/llvm/clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04
HyperX Pro (111 rep)
Aug 14, 2023, 09:18 PM • Last activity: Aug 14, 2023, 09:19 PM
3 votes
2 answers
290 views
Debian Build-Depends on non-package binary
I am developing a Rust application and I want to provide packages for Debian. I have something similar to this configuration under `debian/controls` ``` Source: com.github.yourname.yourrepo Section: x11 Priority: extra Maintainer: Someone Build-Depends: cargo, debhelper (>= 9), libgtk-3-dev, libglib...
I am developing a Rust application and I want to provide packages for Debian. I have something similar to this configuration under debian/controls
Source: com.github.yourname.yourrepo
Section: x11
Priority: extra
Maintainer: Someone
Build-Depends: cargo,
               debhelper (>= 9),
               libgtk-3-dev,
               libglib2.0-dev
Standards-Version: 3.9.3

Package: com.github.yourname.yourrepo
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: SomeApp
Some app developed in Rust
But when I try to build it with debuild it complains that I don't have cargo. However, if I type cargo in my terminal it is present in the system. I guess the reason is that I didn't install the cargo package. And I don't want to force people to install it either, if they already have cargo. Is there a way to enforce having a dependency that is not a Debian package?
Aiono (143 rep)
Jan 22, 2021, 03:35 PM • Last activity: Jun 10, 2023, 03:23 PM
1 votes
3 answers
252 views
kernel bug at kernel/auditsc.c:1532
I'm on a 32 bit CentOS 7 machine. I just do these commands and a kernel panic is observed: ```bash cd repos/ git clone https://github.com/SergioBenitez/Rocket cd Rocket/ cd examples/hello_world/ cargo run -v ``` > kernel BUG at kernel/auditsc.c:1532! > > invalid opcode: 0000 [#1] SMP What should I d...
I'm on a 32 bit CentOS 7 machine. I just do these commands and a kernel panic is observed:
cd repos/
git clone https://github.com/SergioBenitez/Rocket 
cd Rocket/
cd examples/hello_world/
cargo run -v
> kernel BUG at kernel/auditsc.c:1532! > > invalid opcode: 0000 [#1] SMP What should I do? Where to report? I have no idea how to react. Screenshot
Megidd (1579 rep)
Mar 22, 2021, 06:28 AM • Last activity: May 27, 2023, 02:03 PM
0 votes
1 answers
322 views
Getting IPv6 packages when setting a newly created TAP device up
I'm trying to learn how to TCP works by creating a TCP/IP stack, and as the title says, I'm programmatically creating a TAP device in Rust as follows ```rs pub struct Tap { fd: i32, } #[repr(C)] struct IFreq { name: [c_char; IFNAMSIZ], flags: c_short, } impl Tap { pub fn new(name: &CStr) -> Result {...
I'm trying to learn how to TCP works by creating a TCP/IP stack, and as the title says, I'm programmatically creating a TAP device in Rust as follows ```rs pub struct Tap { fd: i32, } #[repr(C)] struct IFreq { name: [c_char; IFNAMSIZ], flags: c_short, } impl Tap { pub fn new(name: &CStr) -> Result { let fd = unsafe { let fd = libc::open(b"/dev/net/tun\0".as_ptr() as *const _, libc::O_RDWR); if fd up` and started reading ethernet frames I seem to only be getting IPv6 frames (ethertype is 0x86DD). Is this normal? How do I stop this from happening? I'm currently only working on implementing IPv4 and don't want to deal with IPv6 traffic.
nee (103 rep)
May 22, 2023, 03:51 PM • Last activity: May 23, 2023, 06:09 AM
-1 votes
1 answers
1047 views
How to uninstall helix-editor completely along with all helix related files and configurations?
The steps here are NOT clear to me. I am using Debian https://github.com/helix-editor/helix/discussions/5228 Installation steps: $ git clone https://github.com/helix-editor/helix ~/helix ‹master› $ cargo install --path helix-term --locked **Can some one guide me in simple steps, please?**
The steps here are NOT clear to me. I am using Debian https://github.com/helix-editor/helix/discussions/5228 Installation steps: $ git clone https://github.com/helix-editor/helix ~/helix ‹master› $ cargo install --path helix-term --locked **Can some one guide me in simple steps, please?**
tom_kp (53 rep)
Apr 26, 2023, 12:03 PM • Last activity: Apr 26, 2023, 02:47 PM
2 votes
0 answers
258 views
pip rust libc.so.6 error Centos
OS: Centos 6 installed pip success Installed Rust manually - success ~~~ curl https://sh.rustup.rs | sh ~~~ ~~~ pip install cryptography /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.rustup/toolchains/stable-x...
OS: Centos 6 installed pip success Installed Rust manually - success ~~~ curl https://sh.rustup.rs | sh ~~~ ~~~ pip install cryptography /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a21dfa8672cc0cdd.so) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-05737cf45bd30456.so) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-05737cf45bd30456.so) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.65.0-stable.so) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.65.0-stable.so) ~~~ which led me to Followed: this for the lib.so error https://stackoverflow.com/a/50697155 also used it as a template for lib 2.17 and 2.15, reloaded the library paths as well ~~~ export LD_LIBRARY_PATH=/opt/glibc-2.17/lib #did the same 2.14 and 2.15 LD_LIBRARY_PATH=/opt/glibc-2.17/lib #did the same 2.14 and 2.15 source /etc/environment #did the same each time for 2.14 and 2.15 after i entered the above commands rustc rustc: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument ~~~~ If I run yum I get the same command as above, but not if I open a new SSH session. Once I open a new SSH session yum works without that error but **rustc** command goes back to my initial error. Even though I reloaded the Env and library. ~~~~ # rustc /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a21dfa8672cc0cdd.so) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-05737cf45bd30456.so) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-05737cf45bd30456.so) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.65.0-stable.so) /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.65.0-stable.so) ~~~~ **env** output ~~~~ TERM=xterm SHELL=/bin/bash HISTSIZE=10000 QTDIR=/usr/lib64/qt-3.3 QTINC=/usr/lib64/qt-3.3/include SSH_TTY=/dev/pts/0 USER=root LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36: MAIL=/var/spool/mail/root PATH=/root/.cargo/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin PWD=/root LANG=en_US.UTF-8 SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass HISTCONTROL=ignoredups SHLVL=1 HOME=/root LOGNAME=root QTLIB=/usr/lib64/qt-3.3/lib CVS_RSH=ssh LESSOPEN=||/usr/bin/lesspipe.sh %s G_BROKEN_FILENAMES=1 _=/bin/env ~~~~ any tips?
user3265051 (199 rep)
Nov 9, 2022, 01:10 AM • Last activity: Nov 9, 2022, 10:11 PM
-3 votes
1 answers
923 views
Why does the Linux kernel not use rust?
I have heard that the Linux Kernel uses rust. I don't know much about the programming language except that it has the potential to run faster than C. According to websites Rust is more safe than C because it's compilation process detects errors and imposes some restrictions. However if the compiled...
I have heard that the Linux Kernel uses rust. I don't know much about the programming language except that it has the potential to run faster than C. According to websites Rust is more safe than C because it's compilation process detects errors and imposes some restrictions. However if the compiled code does not follow those guidelines. You can compile Rust in unsafe mode which is more or less C except not C. However when I looked up if Linux uses Rust the websites that told that C uses Rust. They are lying because I checked the Linux Kernel on GitHub and there is a place in the repository or project that says what percentage of code is being used in the repository or project and it says nothing for Rust. According to the information I got about Rust and C, Rust seems to be much better because it is safer and runs faster than C in some situations. If that is so then why does Rust not use the Linux Kernel? **Please correct me if I am wrong about my claims of Rust and C. I have never coded before but I like comparing languages to see which one is the best. Also if the only reason why the Linux Kernel does not use Rust is because all the Linux developers would have to learn a new language or get fired just say that.**
Linux lover (1 rep)
May 16, 2022, 02:00 PM • Last activity: Sep 21, 2022, 03:09 PM
1 votes
1 answers
696 views
error: component download failed for rls-aarch64-apple-darwin: could not download file from
I want to using mirror address to speed up the rust package download, so I add the mirror address like this: RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install stable but when I execute this command, shows error like this: info: syncing channel updates for 'stable-aarch64-...
I want to using mirror address to speed up the rust package download, so I add the mirror address like this: RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install stable but when I execute this command, shows error like this: info: syncing channel updates for 'stable-aarch64-apple-darwin' warning: Signature verification failed for 'https://mirrors.tuna.tsinghua.edu.cn/rustup/dist/channel-rust-stable.toml ' info: latest update on 2022-05-19, rust version 1.61.0 (fe5b13d68 2022-05-18) info: downloading component 'rls' error: component download failed for rls-aarch64-apple-darwin: could not download file from 'https://mirrors.tuna.tsinghua.edu.cn/rustup/dist/2022-05-19/rls-1.61.0-aarch64-apple-darwin.tar.xz ' to '/Users/xiaoqiangjiang/.rustup/downloads/49825701cecff4497f1019395880e95d4ae006696d499cba15590a4c37e66c7a.partial' I test the download url from my local machine with google chrome browser and the link works fine. why still got this error? what should I do to fixed this problem? Also tried this: RUSTUP_DIST_SERVER=https://static.rust-lang.org/dist/channel-rust-stable.toml rustup update
Dolphin (791 rep)
Jun 1, 2022, 02:13 PM • Last activity: Jul 4, 2022, 11:29 AM
0 votes
1 answers
944 views
Suckless's st messes up UTF-8 sometimes
I wrote an echo program in Rust (which can deal with UTF-8) and occasionally st seems to mess up the UTF-8 input. I've tried different terminal emulators, like alacritty and gnome-terminal and they work fine. To reproduce this: * Run this Rust code in [st](st.suckless.org): ```rust use std::io::BufR...
I wrote an echo program in Rust (which can deal with UTF-8) and occasionally st seems to mess up the UTF-8 input. I've tried different terminal emulators, like alacritty and gnome-terminal and they work fine. To reproduce this: * Run this Rust code in [st](st.suckless.org):
use std::io::BufRead;

fn main() {
    for line in std::io::stdin().lock().lines() {
        let line = line.unwrap();
        println!("{line}");
    }
}
* Input things like "Rückgängig", or other strings with non-english characters. After a while the program should fail:
thread 'main' panicked at 'called Result::unwrap() on an Err value: Error { kind: InvalidData, message: "stream did not contain valid UTF-8" }', src/main.rs:5:25
Does anyone have an idea how this could be fixed or why this happens?
weisbrja (251 rep)
Feb 21, 2022, 03:11 PM • Last activity: Jun 5, 2022, 12:37 AM
0 votes
1 answers
3255 views
CodeLLDB for VSCode not working with remote gdbserver
I'm currently trying to set up remote debugging on a Raspberry Pi using the CodeLLDB plugin for Visual Studio Code and gdbserver. Unfortunately this doesn't seem to work, since every breakpoint I set is greyed out and the tooltip for it reads "Resolved locations: 0". The version of CodeLLDB is `v1.7...
I'm currently trying to set up remote debugging on a Raspberry Pi using the CodeLLDB plugin for Visual Studio Code and gdbserver. Unfortunately this doesn't seem to work, since every breakpoint I set is greyed out and the tooltip for it reads "Resolved locations: 0". The version of CodeLLDB is v1.7.0 and the gdbserver says it's (Raspbian 8.2.1-2) 8.2.1. What makes me think that this *should* work is, that if I connect to the gdbserver manually through lldb using target create /path/to/bin and then gdb-remote host:port it works without a problem. The lldb version that works is 13.0.1, while the CodeLLDB debugger says it's 14.0.0-custom, so maybe that has something to do with it? Anyway, the relevant part of the launch.json looks like this: { "type": "lldb", "request": "custom", "name": "Remote executable 'bin'", "preLaunchTask": "rust: remote ARM debug setup", "targetCreateCommands": ["target create /path/to/bin"], "processCreateCommands": ["gdb-remote host:port"] } Additional infos: - The language I'm trying to debug is **rust** - The binary was compiled for the target arm-unknown-linux-gnueabihf - I'm using VSCode on **Arch Linux** I'm posting this half to organize what I think I know, but obviously also in hope for help. Any tips would be appreciated!
ObiBabobi (25 rep)
May 19, 2022, 08:40 PM • Last activity: May 22, 2022, 12:09 PM
Showing page 1 of 20 total questions