rustdesk/rustdesk · error
%s
Error message
%s
What it means
Immediately after the 'Failed to load "librustdesk.so"' message, the wrapper prints the raw dlerror() string. This is the actual reason the system-wide dlopen failed — classically '<lib>.so: cannot open shared object file: No such file or directory' — and the code then parses that pattern to offer a package-install hint.
Source
Thrown at flutter/linux/main.cc:48
if (!librustdesk) {
char* error = dlerror();
if (error != nullptr) {
fprintf(stderr, "Failed to load \"%s\": %s\n", lib_path, error);
}
}
return librustdesk;
}
bool flutter_rustdesk_core_main() {
void* librustdesk = dlopen_bundled_lib();
if (!librustdesk) {
librustdesk = dlopen(RUSTDESK_LIB_PATH, RTLD_LAZY);
}
if (!librustdesk) {
fprintf(stderr,"Failed to load \"librustdesk.so\"\n");
char* error;
if ((error = dlerror()) != nullptr) {
fprintf(stderr, "%s\n", error);
char* libmissed = strstr(error, ": cannot open shared object file: No such file or directory");
if (libmissed != nullptr) {
*libmissed = '\0';
char* so = strdup(error);
print_help_install_pkg(so);
free(so);
}
}
return false;
}
auto core_main = (RustDeskCoreMain) dlsym(librustdesk,"rustdesk_core_main");
char* error;
if ((error = dlerror()) != nullptr) {
fprintf(stderr, "Program entry \"rustdesk_core_main\" is not found: %s\n", error);
return false;
}
return core_main();
}View on GitHub (pinned to 7aa98d43cf)
Solutions
- Note the library named at the start of the printed line — that is the missing dependency
- Install it via the distro package manager (the program prints a suggested command for common cases)
- Find the providing package with dnf provides / apt-file search / archweb pkgfile
- Re-run rustdesk after installing; no rebuild is needed
Defensive patterns
Strategy: fallback
Validate before calling
# Parse launch logs for the dlerror line and resolve the named library (shell)
ldd /opt/rustdesk/lib/librustdesk.so | awk '/not found/{print $1}' Prevention
- Always read the line following 'Failed to load' — it names the missing dependency
- Resolve dependencies with the distro's provides-search (dnf provides, apt-file search) instead of manual .so downloads
- Keep a container/VM per supported distro to validate loadability before release
When it happens
Trigger: dlopen failed and dlerror() returns non-NULL; the wrapper strstr-matches ': cannot open shared object file: No such file or directory' to extract the missing library name and call print_help_install_pkg.
Common situations: Missing transitive dependency such as libnsl.so.1, libclang.so, or an outdated libcrypto on the host; versioned .so mismatch after a system upgrade.
Related errors
- Failed to load "%s": %s
- Failed to load "librustdesk.so"
- Program entry "rustdesk_core_main" is not found: %s
- Please run "%s install libnsl" to install the required packa
- Please run "%s %s" to search and install the pkg.
AI-assisted analysis of rustdesk/rustdesk@7aa98d43cf (2026-08-16).
Data as JSON: /api/errors/b22caee097e0eb49.
Report an issue: GitHub.