Giter Club home page Giter Club logo

Comments (10)

DjDeveloperr avatar DjDeveloperr commented on August 15, 2024 1

Next release will have support for older GLIBC versions (to an extent), otherwise this issue seems pretty stale so I'll close it for now.

from sqlite3.

asg017 avatar asg017 commented on August 15, 2024

Try running with deno run -A --unstable index.ts, as described here:

Since this library depends on the unstable FFI API, you must pass --allow-env, --allow-ffi and --unstable flags. Network and FS permissions are also needed on macOS and Linux to download and cache prebuilt library. It's recommended to just use --allow-all/-A flag since FFI basically gives full access.

from sqlite3.

dong-lufei avatar dong-lufei commented on August 15, 2024

deno run -A --allow-ffi --unstable index.ts
OK 了

from sqlite3.

DjDeveloperr avatar DjDeveloperr commented on August 15, 2024

If you pass -A, --allow-ffi isn't needed separately.
Apart from that, is it working for you now?

from sqlite3.

dong-lufei avatar dong-lufei commented on August 15, 2024

At that time, I ran deno run -A --unstable index.ts and also reported an error. I don’t know if it is a cache problem or a problem with our Chinese firewall. So adding --allow-ffi found that the operation was successful.

from sqlite3.

DjDeveloperr avatar DjDeveloperr commented on August 15, 2024

That is quite weird. Try upgrading to Deno 1.30.0 and Deno SQLite3 0.7.3 and run with deno run -A --unstable index.ts

from sqlite3.

johanbove avatar johanbove commented on August 15, 2024

Thanks first of all for all the hard work on this! I am unfortunately also experiencing a similar issue.

Testing on WSL on Windows 10, Description: Ubuntu 20.04.5 LTS

deno 1.30.2 (release, x86_64-unknown-linux-gnu)
v8 10.9.194.5
typescript 4.9.4

Running the same code as OP, I get:

$ deno run -A --unstable testsqlite.ts 
Download https://github.com/denodrivers/sqlite3/releases/download/0.7.3/libsqlite3.so
error: Uncaught Error: Failed to load SQLite3 Dynamic Library
  const error = new Error("Failed to load SQLite3 Dynamic Library");
                ^
    at https://deno.land/x/[email protected]/src/ffi.ts:566:17
Caused by: Error: Could not open library: Could not open library: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/johan/.cache/deno/plug/https/github.com/72de3c3884468e55e916274372759c9b1c01127577737e7dfaa5b56718dcdb40.so)
    at new DynamicLibrary (deno:ext/ffi/00_ffi.js:368:48)
    at Object.dlopen (deno:ext/ffi/00_ffi.js:500:12)
    at prepare (https://deno.land/x/[email protected]/plug.ts:117:15)
    at async https://deno.land/x/[email protected]/src/ffi.ts:549:12

Where is GLIBC_2.33 coming from and how to install?

from sqlite3.

johanbove avatar johanbove commented on August 15, 2024

So upgrading to WSL Ubuntu 22.04.1 LTS solved the problem with that library on 20.04 being an unsupported version.

from sqlite3.

asg017 avatar asg017 commented on August 15, 2024

@johanbove yeah, since the libsqlite3.so file is built on a ubuntu-20.04 runner, that means it's only compatible on computers with a glibc version of 2.33 or higher.

@DjDeveloperr would you accept a PR that changes the GH action workflow to use ubuntu-20.04 instead of ubuntu-latest, so the libsqlite3.so is compatible with more servers? Currently ubuntu-latest points to ubuntu-22.04, and GLIBC version 2.33 is pretty high and doesn't run in a lot of places. Another option is the ubuntu-18.04 runner, but that's gonna be deprecated in a few months

from sqlite3.

DjDeveloperr avatar DjDeveloperr commented on August 15, 2024

PR would be welcome @asg017 :)
I'll make a new release 0.7.4 later once the patch lands

from sqlite3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.