A lot of dependencies missing on this Ubuntu style executable

Hi,

I’m getting a lot of dependency missing errors. Is there an easy way to get these packages?
libGL.so.1 => not found
libstdc++.so.6 => not found
libz.so.1 => not found
libgssapi_krb5.so.2 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libz.so.1 => not found
libgthread-2.0.so.0 => not found
libglib-2.0.so.0 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libz.so.1 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libpulse-mainloop-glib.so.0 => not found
libpulse.so.0 => not found
libglib-2.0.so.0 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libz.so.1 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libsmime3.so => not found
libnss3.so => not found
libnssutil3.so => not found
libplds4.so => not found
libplc4.so => not found
libnspr4.so => not found
libX11.so.6 => not found
libXcomposite.so.1 => not found
libXdamage.so.1 => not found
libXext.so.6 => not found
libXfixes.so.3 => not found
libXrender.so.1 => not found
libXrandr.so.2 => not found
libfreetype.so.6 => not found
libexpat.so.1 => not found
libfontconfig.so.1 => not found
libX11-xcb.so.1 => not found
libxcb.so.1 => not found
libxcb-dri3.so.0 => not found
libXcursor.so.1 => not found
libXi.so.6 => not found
libXtst.so.6 => not found
libxkbcommon.so.0 => not found
libdbus-1.so.3 => not found
libasound.so.2 => not found
libz.so.1 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libstdc++.so.6 => not found
libGL.so.1 => not found
libstdc++.so.6 => not found
libdbus-1.so.3 => not found
libstdc++.so.6 => not found
libstdc++.so.6 (GLIBCXX_3.4.14) => not found
libstdc++.so.6 (CXXABI_1.3.5) => not found
libstdc++.so.6 (CXXABI_1.3.7) => not found
libstdc++.so.6 (GLIBCXX_3.4.18) => not found
libstdc++.so.6 (GLIBCXX_3.4.15) => not found
libstdc++.so.6 (GLIBCXX_3.4.9) => not found
libstdc++.so.6 (GLIBCXX_3.4.11) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (GLIBCXX_3.4.21) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libgssapi_krb5.so.2 (gssapi_krb5_2_MIT) => not found
libstdc++.so.6 (GLIBCXX_3.4.18) => not found
libstdc++.so.6 (GLIBCXX_3.4.11) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3.7) => not found
libstdc++.so.6 (CXXABI_1.3.2) => not found
libstdc++.so.6 (GLIBCXX_3.4.11) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (CXXABI_1.3.3) => not found
libstdc++.so.6 (GLIBCXX_3.4.14) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (GLIBCXX_3.4.14) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (GLIBCXX_3.4.14) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4.15) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libpulse.so.0 (PULSE_0) => not found
libz.so.1 (ZLIB_1.2.3.4) => not found
libstdc++.so.6 (GLIBCXX_3.4.14) => not found
libstdc++.so.6 (GLIBCXX_3.4.11) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4.15) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (GLIBCXX_3.4.14) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4.11) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4.9) => not found
libstdc++.so.6 (GLIBCXX_3.4.15) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4.14) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libnssutil3.so (NSSUTIL_3.12.3) => not found
libnssutil3.so (NSSUTIL_3.12) => not found
libdbus-1.so.3 (LIBDBUS_1_3) => not found
libstdc++.so.6 (CXXABI_1.3.2) => not found
libstdc++.so.6 (GLIBCXX_3.4.17) => not found
libstdc++.so.6 (GLIBCXX_3.4.15) => not found
libstdc++.so.6 (GLIBCXX_3.4.14) => not found
libstdc++.so.6 (GLIBCXX_3.4.19) => not found
libstdc++.so.6 (CXXABI_1.3.5) => not found
libstdc++.so.6 (GLIBCXX_3.4.18) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4.9) => not found
libstdc++.so.6 (GLIBCXX_3.4.11) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libnss3.so (NSS_3.12.3) => not found
libnss3.so (NSS_3.5) => not found
libnss3.so (NSS_3.8) => not found
libnss3.so (NSS_3.11.1) => not found
libnss3.so (NSS_3.22) => not found
libnss3.so (NSS_3.9.2) => not found
libnss3.so (NSS_3.10) => not found
libnss3.so (NSS_3.11) => not found
libnss3.so (NSS_3.12) => not found
libnss3.so (NSS_3.2) => not found
libnss3.so (NSS_3.4) => not found
libnss3.so (NSS_3.3) => not found
libasound.so.2 (ALSA_0.9.0rc4) => not found
libasound.so.2 (ALSA_0.9) => not found
libstdc++.so.6 (GLIBCXX_3.4.14) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (GLIBCXX_3.4.14) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libdbus-1.so.3 (LIBDBUS_1_3) => not found
libstdc++.so.6 (GLIBCXX_3.4.11) => not found
libstdc++.so.6 (CXXABI_1.3) => not found
libstdc++.so.6 (GLIBCXX_3.4) => not found

Thanks!

Martin

You most likely have them all, they are just not visible to a binary built for an fhs system because NixOS is not an fhs system.

Your best bet is to find a version of this packaged for nix (or to repackage it yourself). If that is simply impossible, see this wiki page for workarounds: Packaging/Binaries - NixOS Wiki

You can also try setting up an fhs environment for this binary: buildFHSEnv | nixpkgs

1 Like

Many thanks!
I’m learning every day.

Martin

1 Like

For running executables not packaged in nixos, I would recommend looking into nix-alien. For a lot of apps, just using steam-run will also work.

$ cat ~/.config/fish/functions/gib-fhs.fish
function gib-fhs
  nix-shell -E 'with import <nixpkgs> {}; (pkgs.buildFHSUserEnv { name = "fhs"; runScript = "fish"; }).env' $argv

end

This is my fish shell function gib-fhs to be able to use binaries built on other computers and in ultra-normal ubuntu CI. However, libz.so.1 is still missing when I enter this FHS environment.

Thanks. I will have a look at it. Meanwhile I gave up. The application was essential for that machine so I decided not to use Nix os on that machine.

So after struggling with this for two months, it looks like I finally converged on a real solution to run normal linux executables: autoPatchelfHook.

{ pkgs ? import <nixpkgs> {} }:
  pkgs.mkShell {
    nativeBuildInputs = with pkgs; [
    	autoPatchelfHook
    ];
    buildInputs = with pkgs; [
    	zlib
    ];
}

Still doesn’t work for my main use case for this computer, which is compiling unpatched clang.

Previously, I was under the impression that this patching was too manual and that I could just get a nix-shell with all dependencies, and then get into my second shell which gives me FHS, so all deps then would all be available at default LDD paths, but somehow it only worked for locally built binaries. I’ll see how far I get with just autoPatchelfHook. The reason I disregarded it is because its docs don’t cover my use case (just running a binary from the internet) and because I saw posts here like “You can’t just expect to be able to run random binaries from the internet”.

Shame that you left, but I get it. What I wonder about is, how can we turn this into a happy path for less motivated users than me? I was never packaging a binary, and yet the solution is covered by “Packaging/Binary”. I’m not a package maintainer, so I ignored it…

you didn’t say what application it was?

May the nix be with you, always.

Hi Guys, thanks for you warm words. I’m still a fan of Nix os and I will certainly keep an installation on a machine to follow the progress.
The application is called qtVlm. It is a marine navigation software application. It is closed source. I have contacted the developers, but they don’t want to compile a nix package. And I cannot tell them how to do it.
Actually I’m very happy they compile a Linux compatible version after all. The other marine software developers stick with the two major os’s.

Martin