nodejs/node · error
Error creating symbolic links of the data library file.
Error message
Error creating symbolic links of the data library file.
What it means
pkg_createSymLinks() returned non-zero when called from the top-level packaging function (line 826). This function creates symbolic links from the versioned library file to the major-version name (e.g. libicudata.so.76 -> libicudata.so.76.1). The failure means the 'ln -s' or 'rm' shell command inside runCommand() exited with a non-zero status.
Source
Thrown at deps/icu-small/source/tools/pkgdata/pkgdata.cpp:826
/* Certain platforms uses archive library. (e.g. AIX) */
if(o->verbose) {
fprintf(stdout, "# Creating data archive library file ..\n");
}
result = pkg_archiveLibrary(targetDir, o->version, reverseExt);
if (result != 0) {
fprintf(stderr, "Error creating data archive library file.\n");
return result;
}
#if U_PLATFORM != U_PF_OS400
if (!noVersion) {
/* Create symbolic links for the final library file. */
#if U_PLATFORM == U_PF_OS390
result = pkg_createSymLinks(targetDir, o->pdsbuild);
#else
result = pkg_createSymLinks(targetDir, noVersion);
#endif
if (result != 0) {
fprintf(stderr, "Error creating symbolic links of the data library file.\n");
return result;
}
}
#endif
} /* !IN_STATIC_MODE */
#endif
#if !U_PLATFORM_USES_ONLY_WIN32_API
/* Install the libraries if option was set. */
if (o->install != nullptr) {
if(o->verbose) {
fprintf(stdout, "# Installing library file to %s ..\n", o->install);
}
result = pkg_installLibrary(o->install, targetDir, noVersion);
if (result != 0) {
fprintf(stderr, "Error installing the data library.\n");
return result;
}View on GitHub (pinned to 1b2de5e052)
Solutions
- Check write permissions on the target directory.
- Verify the versioned library file exists before pkg_createSymLinks is called.
- If on a filesystem without symlink support, use IN_STATIC_MODE or a flat file layout.
- Run the printed 'ln -s' command manually to see the OS-level error.
Defensive patterns
Strategy: validation
Validate before calling
// Before packaging, verify the target dir supports symlinks and is writable
#include <unistd.h>
#include <sys/stat.h>
bool canCreateSymlinks(const char* dir) {
if (access(dir, W_OK) != 0) return false;
char testpath[1024];
snprintf(testpath, sizeof(testpath), "%s/_icu_symlink_test", dir);
if (symlink("/dev/null", testpath) != 0) return false;
unlink(testpath);
return true;
} Prevention
- Ensure the target directory is writable.
- Verify the filesystem supports symlinks (not FAT32 or certain network mounts).
- Confirm the versioned library file exists before the symlink step.
When it happens
Trigger: Called during non-static, non-Win32 packaging after archive creation, when versioning is enabled (!noVersion). On OS/390 it uses o->pdsbuild; on other Unix it uses noVersion flag. The symlink creation shell command (cd targetDir && rm major && ln -s version major) failed.
Common situations: Permission denied creating symlinks in the target directory; the versioned library file doesn't exist before symlinking; filesystem doesn't support symlinks (e.g. FAT32, some network mounts); running as a user without write permission.
Related errors
- Error creating symbolic links. Failed command: %s\n
- Error creating installation directory: %s\n
- Unable to create map file: %s.\n
- T_FileStream_open failed to open %s for writing\n
- Error installing the data library.\n
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/cfcb72dd4ab5a93f.
Report an issue: GitHub.