Skip to content
← Back to activity

Solution skill

strcpy_chk: symbol not found

Version 2Sign in to save

Complete solution

Libsql Client Ts: strcpy_chk: symbol not found. The verified fix is Fixed via tursodatabase/libsql#1724, released in libsql v0.4.3 - `npm update` picks it up. Use this when you hit the symptoms above in libsql-client-ts; not for unrelated libsql-client-ts errors or general setup questions.

TL;DR

Fixed via tursodatabase/libsql#1724, released in libsql v0.4.3 - npm update picks it up. If still stuck: override @libsql/linux-x64-musl to 0.2.0 (npm overrides / pnpm overrides / yarn resolutions), or use a glibc-based image (bookworm/slim) instead of Alpine.

The error

2024-02-17T11:15:12.739 app[080e513b19e298] ams [info] Error: Error relocating /app/node_modules/@libsql/linux-x64-musl/index.node: __strcpy_chk: symbol not found

Fix

  1. Fixed via tursodatabase/libsql#1724, released in libsql v0.4.3 - npm update picks it up.
  2. If still stuck: override @libsql/linux-x64-musl to 0.2.0 (npm overrides / pnpm overrides / yarn resolutions), or use a glibc-based image (bookworm/slim) instead of Alpine.

Success check: the symptom above is gone and the original operation completes.

When to use

  • You hit this exact symptom in libsql-client-ts.
  • You want the verified fix without digging through the thread.

When not to use

  • A different error in libsql-client-ts, even a similar-looking one.
  • General libsql-client-ts setup or credential questions.

Compatibility

  • Libsql Client Ts (tursodatabase/libsql-client-ts)

Variant phrasings

  • How to fix "strcpy_chk: symbol not found" in libsql-client-ts
  • libsql-client-ts: strcpy_chk: symbol not found

Source

  • https://github.com/tursodatabase/libsql-client-ts/issues/180

Evidence

Asked in gh:tursodatabase/libsql-client-ts#180 (https://github.com/tursodatabase/libsql-client-ts/issues/180): strcpy_chk: symbol not found. The issue report: Issue tursodatabase/libsql-client-ts#180 (closed, 29 comments): I'm trying to package my API into a docker image, using node:20-alpine.

Running my app leads to

2024-02-17T11:15:12.739 app[080e513b19e298] ams [info] node:internal/modules/cjs/loader:1473
2024-02-17T11:15:12.739 app[080e513b19e298] ams [info] return process.dlopen(module, path.toNamespacedPath(filename));
2024-02-17T11:15:12.739 app[080e513b19e298] ams [info] ^
2024-02-17T11:15:12.739 app[080e513b19e298] ams [info] Error: Error relocating /app/node_modules/@libsql/linux-x64-musl/index.node: __strcpy_chk: symbol not found
2024-02-17T11:15:12.739 app[080e513b19e298] ams [info] The verified answer: [LucioFranco (maintainer)]: The musl native binaries shipped since v0.3.1 were linked against glibc symbols (__strcpy_chk, then fcntl64), so they fail on Alpine/musl (`Error relocating ... index.node`). Fixed via tursodatabase/libsql#1724, released in libsql v0.4.3  -  `npm update` picks it up. If still stuck: override `@libsql/linux-x64-musl` to 0.2.0 (npm overrides / pnpm overrides / yarn resolutions), or use a glibc-based image (bookworm/slim) instead of Alpine. Some users reported the issue persisting on later 0.3.x, so the override remains the reliable fallback.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_pg88gIN3sikojyBOOVz-EQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">strcpy_chk: symbol not found <span>— Vectle</span></a>

strcpy_chk: symbol not found | Vectle