{"record":{"id":"04fedff496f9ab5b","repo":"nodejs/node","slug":"no-libnode-so-to-install","errorCode":null,"errorMessage":"No libnode.so to install!","messagePattern":"No libnode\\.so to install!","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"tools/install.py","lineNumber":194,"sourceCode":"      # install libnode.version.so\n      so_name = 'libnode.' + re.sub(r'\\.x$', '.so', options.variables.get('shlib_suffix'))\n      action(options, [os.path.join(output_prefix, so_name)], options.variables.get('libdir') + '/' + so_name)\n\n      # create symlink of libnode.so -> libnode.version.so (C++ addons compat)\n      link_path = abspath(options.install_path, 'lib/libnode.so')\n      try_symlink(options, so_name, link_path)\n    else:\n      # Ninja and Makefile generators output the library in different directories;\n      # find out which one we have, and install first found\n      output_lib_name = 'libnode.' + options.variables.get('shlib_suffix')\n      output_lib_candidate_paths = [\n        os.path.join(options.build_dir, output_lib_name),\n        os.path.join(options.build_dir, \"lib\", output_lib_name),\n      ]\n      try:\n        output_lib = next(filter(os.path.exists, output_lib_candidate_paths))\n      except StopIteration as not_found:\n        raise RuntimeError(\"No libnode.so to install!\") from not_found\n      action(options, [output_lib],\n             os.path.join(options.variables.get('libdir'), output_lib_name))\n\n  action(options, [os.path.join(options.v8_dir, 'tools/gdbinit')], 'share/doc/node/')\n  action(options, [os.path.join(options.v8_dir, 'tools/lldb_commands.py')], 'share/doc/node/')\n\n  if 'openbsd' in sys.platform:\n    action(options, ['doc/node.1'], 'man/man1/')\n  else:\n    action(options, ['doc/node.1'], 'share/man/man1/')\n\n  if 'true' == options.variables.get('node_install_npm'):\n    npm_files(options, action)\n\n  if 'true' == options.variables.get('node_install_corepack'):\n    corepack_files(options, action)\n\n  headers(options, action)","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/tools/install.py#L176-L212","documentation":"When node is built as a shared library (configure variable node_shared=true, on non-Windows/non-z/OS), tools/install.py looks for the built libnode.<shlib_suffix> in build_dir/ and build_dir/lib/ (ninja vs make output locations). If neither exists it raises RuntimeError, because there is no artifact to install.","triggerScenarios":"Running `python tools/install.py install` (or `make install`) with a --shared configuration but without first building, or with --build-dir pointing somewhere the lib was never written.","commonSituations":"Forgot to run the build; built into out/Release but installed with default/Debug build_dir; build failed silently; shlib_suffix variable mismatch; the lib landed in an uncovered output dir.","solutions":["Build the shared library first with the same configuration, e.g. `make -j$(nproc) out/Release/libnode.so.71` (match your shlib_suffix).","Verify the artifact exists: `ls out/Release/libnode.* out/Release/lib/libnode.*`.","Pass the correct --build-dir (the directory that actually contains the built lib)."],"exampleFix":"// before\npython tools/install.py install --build-dir=out/Debug   # never built Debug\n// after\nmake -j$(nproc) out/Release/libnode.so.71\npython tools/install.py install --build-dir=out/Release","handlingStrategy":"validation","validationCode":"import os, glob\nbd=options.build_dir; suf=options.variables.get('shlib_suffix')\ncands=[os.path.join(bd,f'libnode.{suf}'), os.path.join(bd,'lib',f'libnode.{suf}')]\nassert any(os.path.exists(c) for c in cands), f'no libnode.{suf} in {bd}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always build before install, using the same build_dir you pass to install.py.","Confirm shlib_suffix matches the file the generator actually produced."],"tags":["install","shared-library","build","node"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}