Expressvpn module: Unable to locate executable in nix store

(Edited since the issue is now different)

Problem Statement

  • I am really confused whether expressvpnd (the daemon) exists on my system. It exists in path and can attempt to call resolv.conf (unsuccessfully), but the symlink in the derivation path is seemingly broken.
  • If the symlink is broken, I don’t understand why it is broken.
  • Ultimately I want to resolve the Unable to locate executable error.

Context

I enabled expressvpn in systemPackages (in configuration.nix), and also made services.expressvpn.enabe = true;.

Jan 12 11:30:18 nixos (ressvpnd)[54917]: expressvpn.service: Unable to locate executable '/nix/store/c8by89d26phzmc6ly810l73nnncshdkm-expressvpn-3.52.0.2/bin/expressvpnd': No such file or directory
Jan 12 11:30:18 nixos (ressvpnd)[54917]: expressvpn.service: Failed at step EXEC spawning /nix/store/c8by89d26phzmc6ly810l73nnncshdkm-expressvpn-3.52.0.2/bin/expressvpnd: No such file or directory
  • I did a find in nix store and there are several derivation paths and the last one matches what’s in the service module:
/nix/store/gyq6ppbvq5rw4qb72i3fgsf5gi7c0l1b-expressvpn-3.52.0.2/bin/expressvpnd
/nix/store/2d27sgbl19ny767xf28gfslr9885206z-expressvpn-3.52.0.2/bin/expressvpnd
/nix/store/rz5sk0rx1bq9i9r3vxvibcy9kzn31wk1-expressvpn-3.52.0.2/bin/expressvpnd
/nix/store/c8by89d26phzmc6ly810l73nnncshdkm-expressvpn-3.52.0.2/bin/expressvpnd

When I run $ nix why-depends /run/current-system nixpkgs#expressvpn I get:

/nix/store/1c2r77p0vvv45b2ys8pwa02dy7khqxqa-nixos-system-nixos-25.05.20241229.88195a9
└───/nix/store/60ij0q992f0bpqf6w7qjssyi3x8zcsya-system-path
    └───/nix/store/c8by89d26phzmc6ly810l73nnncshdkm-expressvpn-3.52.0.2

It is the same derivation path referenced by the service module.

However, when I run ldd /nix/store/c8by89d26phzmc6ly810l73nnncshdkm-expressvpn-3.52.0.2/bin/expressvpnd I get:

ldd: /nix/store/c8by89d26phzmc6ly810l73nnncshdkm-expressvpn-3.52.0.2/bin/expressvpnd: No such file or directory

I looked into the folder /nix/store/c8by89d26phzmc6ly810l73nnncshdkm-expressvpn-3.52.0.2/bin and expressvpnd is a symlink to /nix/store/ig1yy714l57mpq7np6625bm9rxjw118y-expressvpn-3.52.0.2/bin/expressvpnd, but the target executable does not exist.

I am trying to figure out why the service module cannot find this derivation path.

Additional context:
When I run expressvpnd I get:

cp: cannot stat '/host/etc/resolv.conf': No such file or directory
/etc/ CLOSE_NOWRITE,CLOSE ld.so.cache
cp: cannot create regular file '/host/etc/resolv.conf': No such file or directory

But I can locate resolv.conf in /etc/ (dumb question /host/etc = /etc right?)

Then strace -f expressvpnd shows the same No such file or directory error.

Thanks!

 No such file or directory

in the case of running a binary usually means it can’t find a shared library, so the packaging might need fixing.

Thanks for the reply! Not sure if it is relevant, but when I run expressvpn activate it simply says

Cannot connect to expressvpnd daemon.

It seems that the expressvpn daemon is not running. Please run "sudo service expressvpn restart" to start it.

It means the package is there right?

This seems to be a symlink, to something that doesn’t exist…

$ ls -l result/bin/
total 8
lrwxrwxrwx 3 root root 78 Jan  1  1970 expressvpn -> /nix/store/rz5sk0rx1bq9i9r3vxvibcy9kzn31wk1-expressvpn-3.52.0.2/bin/expressvpn
lrwxrwxrwx 2 root root 79 Jan  1  1970 expressvpnd -> /nix/store/q45drcds5xckr2zdnfx7ym3n2kz6nq6q-expressvpn-3.52.0.2/bin/expressvpnd

edit

In the copy/paste you do not see it of course… but on my terminal that expressvpnd link is in read, meaning its a dead link.

1 Like

That’s right! I get the same red link - it’s dead. But I don’t understand why it is dead. Is it a problem of the Nix build package or a problem with my operating system?

It is very likely a problem with the derivation, yes.

Okay thanks! If anybody managed to get expressvpn (the closed source app) working on Nixos please let me know…After some digging, it seems people tend to use their expressvpn config file with OpenVPN to get around the problem. The cause of the issue might be that expressvpn uses systemd which is not compatible with distros that use Network Manager. But - I don’t know for sure.

Looks like the issue has already been reported: expressvpn service not starting · Issue #366428 · NixOS/nixpkgs · GitHub

2 Likes