[GH-ISSUE #57] [Error] libgfortran.so.5: No such file or directory #34

Closed
opened 2026-02-22 18:17:35 -05:00 by yindo · 3 comments
Owner

Originally created by @jwaltz on GitHub (Jun 14, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/57

With a fresh repo, I receive the following error from the server upon first visiting localhost:3001 after running yarn dev:server and yarn dev:frontend. This is on Ubuntu 22.04 running in WSL:

$ NODE_ENV=development nodemon --ignore documents --ignore vector-cache --trace-warnings index.js
[nodemon] 2.0.22
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node --trace-warnings index.js`
Example app listening on port 3001
libgfortran.so.5: cannot open shared object file: No such file or directory Error: libgfortran.so.5: cannot open shared object file: No such file or directory
    at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at getPlatformLibrary (/home/jwaltz/git_projects/anything-llm/server/node_modules/vectordb/native.js:23:16)
    at Object.<anonymous> (/home/jwaltz/git_projects/anything-llm/server/node_modules/vectordb/native.js:33:21)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32) {
  code: 'ERR_DLOPEN_FAILED'
}

The call stack indicates this is coming from vectordb (lance), but I have lance commented out in .env.development. I've noticed lance has caused some issues with requiring certain libc files and has especially complicated the docker implementation.

What should I do to go about fixing this? I guess I could try to install all of the missing deps required by vectordb to my OS but I feel like that shouldn't be my first option. Is it possible to avoid these requirements by not calling on vectordb if lance isn't the preferred vector database according to the .env file(s)?

Originally created by @jwaltz on GitHub (Jun 14, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/57 With a fresh repo, I receive the following error from the server upon first visiting `localhost:3001` after running `yarn dev:server` and `yarn dev:frontend`. This is on Ubuntu 22.04 running in WSL: ``` $ NODE_ENV=development nodemon --ignore documents --ignore vector-cache --trace-warnings index.js [nodemon] 2.0.22 [nodemon] to restart at any time, enter `rs` [nodemon] watching path(s): *.* [nodemon] watching extensions: js,mjs,json [nodemon] starting `node --trace-warnings index.js` Example app listening on port 3001 libgfortran.so.5: cannot open shared object file: No such file or directory Error: libgfortran.so.5: cannot open shared object file: No such file or directory at Module._extensions..node (node:internal/modules/cjs/loader:1338:18) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at getPlatformLibrary (/home/jwaltz/git_projects/anything-llm/server/node_modules/vectordb/native.js:23:16) at Object.<anonymous> (/home/jwaltz/git_projects/anything-llm/server/node_modules/vectordb/native.js:33:21) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) { code: 'ERR_DLOPEN_FAILED' } ``` The call stack indicates this is coming from vectordb (lance), but I have lance commented out in `.env.development`. I've noticed lance has caused some issues with requiring certain libc files and has especially complicated the docker implementation. What should I do to go about fixing this? I guess I could try to install all of the missing deps required by vectordb to my OS but I feel like that shouldn't be my first option. Is it possible to avoid these requirements by not calling on vectordb if lance isn't the preferred vector database according to the `.env` file(s)?
yindo added the documentation label 2026-02-22 18:17:35 -05:00
yindo closed this issue 2026-02-22 18:17:35 -05:00
Author
Owner

@jwaltz commented on GitHub (Jun 14, 2023):

If I change the getVectorDbClass() function to the following I do not receive the error:

function getVectorDbClass() {

  const vectorSelection = process.env.VECTOR_DB || "pinecone";
  switch (vectorSelection) {
    case "pinecone":
      const { Pinecone } = require("../vectorDbProviders/pinecone");
      return Pinecone;
    case "chroma":
      const { Chroma } = require("../vectorDbProviders/chroma");
      return Chroma;
    case "lancedb":
      const { LanceDb } = require("../vectorDbProviders/lance");
      return LanceDb;
    default:
      throw new Error("ENV: No VECTOR_DB value found in environment!");
  }
}

In a production environment built with Docker, there wouldn't be problems with missing vectordb dependencies. However, until development is moved to a Docker-based workflow (if at all) I can see many OS having issues with the vectordb lib.

LMK if you want this to be a pull request. I can clean it up a bit and make it more robust.

@jwaltz commented on GitHub (Jun 14, 2023): If I change the `getVectorDbClass()` function to the following I do not receive the error: ``` function getVectorDbClass() { const vectorSelection = process.env.VECTOR_DB || "pinecone"; switch (vectorSelection) { case "pinecone": const { Pinecone } = require("../vectorDbProviders/pinecone"); return Pinecone; case "chroma": const { Chroma } = require("../vectorDbProviders/chroma"); return Chroma; case "lancedb": const { LanceDb } = require("../vectorDbProviders/lance"); return LanceDb; default: throw new Error("ENV: No VECTOR_DB value found in environment!"); } } ``` In a production environment built with Docker, there wouldn't be problems with missing vectordb dependencies. However, until development is moved to a Docker-based workflow (if at all) I can see many OS having issues with the vectordb lib. LMK if you want this to be a pull request. I can clean it up a bit and make it more robust.
Author
Owner

@timothycarambat commented on GitHub (Jun 16, 2023):

It may become high time a dev workflow using Docker is arranged. This is going to continue to be an issue in a host machine dev env :/

@timothycarambat commented on GitHub (Jun 16, 2023): It may become high time a dev workflow using Docker is arranged. This is going to continue to be an issue in a host machine dev env :/
Author
Owner

@hillct commented on GitHub (Jun 23, 2023):

It may become high time a dev workflow using Docker is arranged. This is going to continue to be an issue in a host machine dev env :/

Agreed. Having a reproducible is going to be critical to facilitating contributions.

@hillct commented on GitHub (Jun 23, 2023): > It may become high time a dev workflow using Docker is arranged. This is going to continue to be an issue in a host machine dev env :/ Agreed. Having a reproducible is going to be critical to facilitating contributions.
yindo changed title from [Error] libgfortran.so.5: No such file or directory to [GH-ISSUE #57] [Error] libgfortran.so.5: No such file or directory 2026-06-05 14:33:07 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#34