skip to Main Content

I’m getting below error in Apache error logs:

django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)

I verified the sqlite3 version both in virtual environment and non virtual environment (standard). I can see the latest sqlite3 in both Python.

$ python3.7
Python 3.7.12 (default, Nov  8 2021, 09:02:58)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sqlite3 import dbapi2 as Database
>>> Database.sqlite_version_info
(3, 36, 0)

Error log from Apache web server:

[Mon Nov 08 15:02:33.698244 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615]     backend = load_backend(db['ENGINE'])
[Mon Nov 08 15:02:33.698249 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615]   File "/home/rafiq/myprojectenv/lib/python3.7/site-packages/django/db/utils.py", line 111, in load_backend
[Mon Nov 08 15:02:33.698252 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615]     return import_module('%s.base' % backend_name)
[Mon Nov 08 15:02:33.698257 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615]   File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
[Mon Nov 08 15:02:33.698260 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615]     return _bootstrap._gcd_import(name[level:], package, level)
[Mon Nov 08 15:02:33.698265 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615]   File "/home/rafiq/myprojectenv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 73, in <module>
[Mon Nov 08 15:02:33.698267 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615]     check_sqlite_version()
[Mon Nov 08 15:02:33.698273 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615]   File "/home/rafiq/myprojectenv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 69, in check_sqlite_version
[Mon Nov 08 15:02:33.698276 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615]     'SQLite 3.9.0 or later is required (found %s).' % Database.sqlite_version
[Mon Nov 08 15:02:33.698294 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17).

I see the latest version Python but why Apache reports 3.7.17?

2

Answers


  1. Chosen as BEST ANSWER

    I resolved the problem with the below steps.

    mv /usr/bin/sqlite3 /usr/bin/sqlite3_3.7.9
    ln -s /usr/local/bin/sqlite3 /usr/bin/sqlite3
    

    The document which I followed doesn't contain the above-mentioned two commands and that helped to overcome the actual issue.


  2. try this:

    # Intall sqlite3 version 3.39.4
    - wget https://www.sqlite.org/2022/sqlite-autoconf-3390400.tar.gz 
    - tar xvfz sqlite-autoconf-3390400.tar.gz
    - cd sqlite-autoconf-3390400
    - ./configure
    - make
    - make install 
    - PATH=$PATH:/usr/local/lib
    - sqlite3 --version
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search