Getting Error: undefined symbol: sqlite3_enable_shared_cache

Jeremy Gillick <svn-guvI891tgwPqlBn2x/[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
I've been banging my head against this and cannot find any information 
online to help.

I have installed SQLite 3.3.13 and PySQLite 2.3.3 without any errors.  
My server is running on Fedora Linux with Python 2.5.  When I try to 
test the PySQLite install, I get the following error:

    $ python
    Python 2.5 (r25:51908, Nov 22 2006, 02:11:19)
    [GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
     >>> *from pysqlite2 import test*
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File
    "/usr/local/lib/python2.5/site-packages/pysqlite2/test/__init__.py",
    line 25, in <module>
        from pysqlite2.test import dbapi, types, userfunctions, factory,
    transactions,\
      File
    "/usr/local/lib/python2.5/site-packages/pysqlite2/test/dbapi.py",
    line 26, in <module>
        import pysqlite2.dbapi2 as sqlite
      File "/usr/local/lib/python2.5/site-packages/pysqlite2/dbapi2.py",
    line 27, in <module>
        from pysqlite2._sqlite import *
    ImportError:
    /usr/local/lib/python2.5/site-packages/pysqlite2/_sqlite.so:
    *undefined symbol: sqlite3_enable_shared_cache
    *

Here's what's in my site-packages directory:

    $ ls -al /usr/local/lib/python2.5/site-packages/
    total 64
    drwxr-xr-x   5 root root  4096 Mar  6 10:29 .
    drwxr-xr-x  21 root root 16384 Nov 21 23:16 ..
    lrwxrwxrwx   1 root root    33 Feb 14 00:00 libsvn ->
    /usr/local/lib/svn-python/libsvn/
    drwxr-xr-x   2 root root  4096 Nov 22 15:11 mod_python
    -rw-r--r--   1 root root   255 Nov 22 15:11
    mod_python-3.2.10-py2.5.egg-info
    drwxr-xr-x   3 root root   104 Mar  6 10:29 pysqlite2
    -rw-r--r--   1 root root  1005 Mar  6 10:29
    pysqlite-2.3.3-py2.5.egg-info
    -rw-r--r--   1 root root   119 Nov 21 23:15 README
    lrwxrwxrwx   1 root root    30 Feb 14 00:00 svn ->
    /usr/local/lib/svn-python/svn/
    drwxr-xr-x  11 root root  4096 Mar  5 10:15 trac
    -rw-r--r--   1 root root   538 Mar  5 10:15 trac-0.10.2-py2.5.egg-info


And under pysqlite2:

    $ ls -al /usr/local/lib/python2.5/site-packages/pysqlite2/
    total 196
    drwxr-xr-x  3 root root    104 Mar  6 10:29 .
    drwxr-xr-x  5 root root   4096 Mar  6 10:29 ..
    -rw-rw-r--  1 root root   2643 Jan 13 15:56 dbapi2.py
    -rw-r--r--  1 root root   2830 Mar  6 10:29 dbapi2.pyc
    -rw-rw-r--  1 root root   1015 Jan 13 15:56 __init__.py
    -rw-r--r--  1 root root    147 Mar  6 10:29 __init__.pyc
    -rwxrwxr-x  1 root root 174612 Mar  6 10:28 _sqlite.so
    drwxr-xr-x  2 root root   4096 Mar  6 10:29 test


Here's where python is on my system:

    $ which python
    /usr/local/bin/python

    $ whereis python
    python: /usr/bin/python /usr/bin/python2.4 /usr/lib/python2.4
    /usr/local/bin/python2.5 /usr/local/bin/python2.5-config
    /usr/local/bin/python /usr/local/lib/python2.5

    $ python --version
    Python 2.5


I'm installing PySQLite for Trac.  When I try to create a Trac 
environment (via trac-admin //dir// initenv) I get the following error 
Python error:

    Creating and Initializing Project
    Failed to create environment. global name 'sqlite' is not defined
    Traceback (most recent call last):
      File
    "/usr/local/lib/python2.5/site-packages/trac/scripts/admin.py", line
    613, in do_initenv
        options=options)
      File "/usr/local/lib/python2.5/site-packages/trac/env.py", line
    124, in __init__
        self.create(options)
      File "/usr/local/lib/python2.5/site-packages/trac/env.py", line
    229, in create
        DatabaseManager(self).init_db()
      File "/usr/local/lib/python2.5/site-packages/trac/db/api.py", line
    69, in init_db
        connector.init_db(**args)
      File
    "/usr/local/lib/python2.5/site-packages/trac/db/sqlite_backend.py",
    line 121, in init_db
        cnx = sqlite.connect(path, timeout=int(params.get('timeout',
    10000)))
    NameError: global name 'sqlite' is not defined


After installing SQLite and PySQLite I did run ldconfig as was suggested 
in another thread I saw:

    $sudo /sbin/ldconfig


Anybody have any ideas?

Thanks,
Jeremy

_______________________________________________
pysqlite mailing list
pysqlite-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/pysqlite
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.