(NixOS) Fixing "Could not start dynamically linked executable" When Launching mcp server via uvx
As shown under another article, I’m using uvx to run some mcp servers needed by mcp.el. However, when I first started them on NixOS, I encountered an error. After consulting Gemini for solutions and a root cause analysis, here are my notes. Symptoms and Error Message Checking the *Mcp-Hub/ buffer with mcp-hub-view-log, the following error appeared: [stderr] Could not start dynamically linked executable: /home/bk/.cache/uv/archive-v0/unI5q9QapqXHm9fPXna4G/bin/python [stderr] NixOS cannot run dynamically linked executables intended for generic [stderr] linux environments out of the box. For more information, see: [stderr] https://nix.dev/permalink/stub-ld [jsonrpc] D[14:56:49.461] Connection state change: `exited abnormally with code 127 Solution: Enable nix-ld Adding the following to your nix configuration resolved the issue for me: ...