Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error drupal 11 with sqlite #264

Open
svicervlad opened this issue Aug 6, 2024 · 10 comments
Open

Installation error drupal 11 with sqlite #264

svicervlad opened this issue Aug 6, 2024 · 10 comments

Comments

@svicervlad
Copy link

svicervlad commented Aug 6, 2024

When I try to install Drupal 11 with a sqlite database I get an error

The database server version 3.40.1 is less than the minimum required version 3.45.

Image: drupal:11.0.0-php8.3-apache-bookworm

I think SQLite should be supported in Drupal Docker images for several important reasons, making it an ideal choice for specific use cases.

Key Advantages of SQLite in Docker Images of Drupal:

  1. Ease of Setup: SQLite requires no complex configuration. All that’s needed is a database file, making it perfect for quick testing or development.
  2. Minimal Dependencies: Using SQLite reduces the number of additional services that need to be run and managed in the container, simplifying deployment and maintenance.
  3. Drupal Support: Drupal officially supports SQLite as one of the database options. Therefore, you can expect that functionality will work correctly in any environment, including Docker.
  4. Local Development: For developers working on Drupal in Docker containers, using SQLite can be a convenient solution for local development where a more complex database isn’t needed.
  5. Simplicity in Backup and Restoration: Since SQLite’s database is stored as a single file, it’s easy to back up and transfer between environments.

Demonstrations with Drupal:

  1. Quick Deployment of Demo Sites: With SQLite, you can quickly deploy demo versions of Drupal sites without the need to configure a full-fledged database. This is ideal for presentations where you need to showcase functionality or themes quickly.
  2. Single File Database: SQLite allows the entire database to be stored in a single file. This is convenient for creating and distributing Docker demo images that can be easily transferred and run on different machines without additional setup.
  3. Resource Minimization: Since demonstrations usually don’t require high performance or scalability, SQLite becomes an optimal solution that minimizes resource usage.
@tianon
Copy link
Member

tianon commented Aug 6, 2024

Ouch, confirmed: https://www.drupal.org/docs/getting-started/system-requirements/database-server-requirements#s-drupal-11--3

(I also tested - totally stock image deployment with no additional configuration and simply choosing SQLite in the setup wizard 😞)

@tianon
Copy link
Member

tianon commented Aug 6, 2024

Looking at https://packages.debian.org/bookworm/sqlite3, I'm also not sure there's a good way for us to solve this (there's not a newer version available for bookworm).

@tianon
Copy link
Member

tianon commented Aug 6, 2024

Looks like this was part of https://www.drupal.org/project/drupal/issues/3346338 (actually codified in drupal/drupal@10466db, which references https://www.drupal.org/project/drupal/issues/3420972 instead but that one is about testing, not about bumping the requirement).

@tianon
Copy link
Member

tianon commented Aug 6, 2024

The first Debian release that supports 3.45 is Trixie, most likely released 2025, This is after Drupal 11 release. The latest version supported by Debian is 3.40.1-2.

and

Require sqlite 3.45 for Drupal 11. Very few sites run SQLite in production, and any existing ones which aren't yet ready to update to 3.45 are able to stay on Drupal 10 for two years beyond Drupal 11's release date.

😞

@tianon
Copy link
Member

tianon commented Aug 6, 2024

From comments like this:

I think if there are really good reasons, we can roll this back, but I agree sqlite is mainly used for testing locally.

I believe we can safely infer that this is a "wontfix" / intentional breakage for upstream.

https://www.drupal.org/project/drupal/issues/3346338#comment-15370259 suggests that there could be (slash will be?) a contrib module with can be used instead to get sqlite support working on older sqlite versions, but I have not found it yet.

@tianon
Copy link
Member

tianon commented Aug 6, 2024

From https://www.drupal.org/project/drupal/issues/3346338#comment-15577306, it looks like that might exist at https://www.drupal.org/project/sqlite326 someday, but does not currently (and no ETA), so I think that's as far as we can reasonably take this unless/until someone writes that module.

For the avoidance of doubt, I am not very comfortable with us building our own copy of SQLite from source to fix this issue (for similar reasons to upstream deciding it was worth doing a breaking change even knowing it would exclude some set of users and that it wasn't important enough to stop them from doing so).

@svicervlad
Copy link
Author

ddev/ddev#6110 Fixed in ddev ddev/ddev#6137 by installing sqlite pkg from Debian Trixie.

@svicervlad
Copy link
Author

svicervlad commented Aug 7, 2024

or maybe better to use apt_preferences instead of wget and dpkg https://wiki.debian.org/AptConfiguration?action=show&redirect=AptPreferences#apt_preferences_.28APT_pinning.29

@tianon
Copy link
Member

tianon commented Aug 7, 2024

Installing the package from Trixie is something that will currently maybe work, but is likely to break in the future, especially as Trixie is not in any stage of freeze.

@mcdruid
Copy link

mcdruid commented Sep 20, 2024

AFAICS the workaround of installing sqlite 3.45.1 from the trixie repo (see ddev/ddev#6137 and ddev/ddev#6110 ) has indeed stopped working.

The version in the repo seems to have changed to 3.46 which means the 3.45 urls now return a 404 - e.g.:

#24 [web 7/8] RUN SQLITE_VERSION=3.45.1 &&     mkdir -p /tmp/sqlite3 &&     wget -O /tmp/sqlite3/sqlite3.deb https://ftp.debian.org/debian/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_amd64.deb &&     wget -O /tmp/sqlite3/libsqlite3.deb https://ftp.debian.org/debian/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_amd64.deb &&     dpkg -i /tmp/sqlite3/*.deb &&     rm -rf /tmp/sqlite3
#24 0.195 --2024-09-20 07:32:39--  https://ftp.debian.org/debian/pool/main/s/sqlite3/sqlite3_3.45.1-1_amd64.deb
#24 0.206 Resolving ftp.debian.org (ftp.debian.org)... 146.75.74.132, 2a04:4e42:82::644
#24 0.220 Connecting to ftp.debian.org (ftp.debian.org)|146.75.74.132|:443... connected.
#24 0.248 HTTP request sent, awaiting response... 404 Not Found

Trying to install 3.46 instead results in dependency errors:

#24 0.543 Preparing to unpack /tmp/sqlite3/libsqlite3.deb ...
#24 0.559 Unpacking libsqlite3-0:amd64 (3.46.1-1) over (3.40.1-2) ...
#24 0.667 Preparing to unpack /tmp/sqlite3/sqlite3.deb ...
#24 0.683 Unpacking sqlite3 (3.46.1-1) over (3.40.1-2) ...
#24 0.754 dpkg: dependency problems prevent configuration of libsqlite3-0:amd64:
#24 0.754  libsqlite3-0:amd64 depends on libc6 (>= 2.38); however:
#24 0.754   Version of libc6:amd64 on system is 2.36-9+deb12u7.
#24 0.754 
#24 0.754 dpkg: error processing package libsqlite3-0:amd64 (--install):
#24 0.754  dependency problems - leaving unconfigured
#24 0.754 dpkg: dependency problems prevent configuration of sqlite3:
#24 0.754  sqlite3 depends on libreadline8t64 (>= 6.0); however:
#24 0.754   Package libreadline8t64 is not installed.
#24 0.754  sqlite3 depends on libsqlite3-0 (= 3.46.1-1); however:
#24 0.754   Package libsqlite3-0:amd64 is not configured yet.
#24 0.754 
#24 0.754 dpkg: error processing package sqlite3 (--install):
#24 0.754  dependency problems - leaving unconfigured
#24 0.755 Processing triggers for libc-bin (2.36-9+deb12u7) ...
#24 0.977 Errors were encountered while processing:
#24 0.977  libsqlite3-0:amd64
#24 0.977  sqlite3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants