I’m trying to follow a tutorial on MCP and it uses uvx.
It seems all of these MCP tutorials using this command;)
I get this
$ uvx pycowsay hello from uv
error: Querying Python at `/home/b0ef/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/bin/python3.13` failed with exit status exit status: 127
--- stdout:
--- stderr:
Could not start dynamically linked executable: /home/b0ef/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/bin/python3.13
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
---
I’ve tried to search a little, but what I find seems to solve other problems.
This seems more like a hack to run executables, but can’t something like uvx be packaged? I mean, it doesn’t seem like it wants to install something. It sort of downloads everything it needs before it runs something, to my understanding.
Exactly. But those things it downloads have a hardcoded path to a required dynamic linker at /lib64/ld-linux-x86-64.so.2.
They won’t work if this file is not there. And by default this file is not there on NixOS. So your choices are:
add this file, so that the downloaded binaries work out of the box
patch the downloaded binaries with paths to nix-store for all required libs