{"record":{"id":"cfcb72dd4ab5a93f","repo":"nodejs/node","slug":"error-creating-symbolic-links-of-the-data-library","errorCode":null,"errorMessage":"Error creating symbolic links of the data library file.\n","messagePattern":"Error creating symbolic links of the data library file\\.\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"deps/icu-small/source/tools/pkgdata/pkgdata.cpp","lineNumber":826,"sourceCode":"                /* Certain platforms uses archive library. (e.g. AIX) */\n                if(o->verbose) {\n                  fprintf(stdout, \"# Creating data archive library file ..\\n\");\n                }\n                result = pkg_archiveLibrary(targetDir, o->version, reverseExt);\n                if (result != 0) {\n                    fprintf(stderr, \"Error creating data archive library file.\\n\");\n                   return result;\n                }\n#if U_PLATFORM != U_PF_OS400\n                if (!noVersion) {\n                    /* Create symbolic links for the final library file. */\n#if U_PLATFORM == U_PF_OS390\n                    result = pkg_createSymLinks(targetDir, o->pdsbuild);\n#else\n                    result = pkg_createSymLinks(targetDir, noVersion);\n#endif\n                    if (result != 0) {\n                        fprintf(stderr, \"Error creating symbolic links of the data library file.\\n\");\n                        return result;\n                    }\n                }\n#endif\n            } /* !IN_STATIC_MODE */\n#endif\n\n#if !U_PLATFORM_USES_ONLY_WIN32_API\n            /* Install the libraries if option was set. */\n            if (o->install != nullptr) {\n                if(o->verbose) {\n                  fprintf(stdout, \"# Installing library file to %s ..\\n\", o->install);\n                }\n                result = pkg_installLibrary(o->install, targetDir, noVersion);\n                if (result != 0) {\n                    fprintf(stderr, \"Error installing the data library.\\n\");\n                    return result;\n                }","sourceCodeStart":808,"sourceCodeEnd":844,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/icu-small/source/tools/pkgdata/pkgdata.cpp#L808-L844","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before packaging, verify the target dir supports symlinks and is writable\n#include <unistd.h>\n#include <sys/stat.h>\n\nbool canCreateSymlinks(const char* dir) {\n    if (access(dir, W_OK) != 0) return false;\n    char testpath[1024];\n    snprintf(testpath, sizeof(testpath), \"%s/_icu_symlink_test\", dir);\n    if (symlink(\"/dev/null\", testpath) != 0) return false;\n    unlink(testpath);\n    return true;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["icu","pkgdata","symlink","filesystem","permissions","build-tool"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}