Installing Python 3.1.2 from source, how do you resolve thesqlite3-dev dependency?

Discussion in 'Python' started by Trevor, Jun 16, 2010.

  1. Trevor

    Trevor Guest

    Running ubuntu 9.04 "jaunty".

    When I run make I get the following error:

    Python build finished, but the necessary bits to build these
    modules were not found:
    _sqlite3


    So the easy solution is to just install the missing dependency using
    apt-get, "sudo apt-get -f install libsqlite3-dev" but I get the
    following error:

    The following packages have unmet dependencies:
    libsqlite3-dev: Depends: libsqlite3-0 (= 3.6.10-1) but
    3.6.10-1ubuntu0.2 is to be installed
    E: Broken packages

    I tried uninstalling "libsqlite3-0" but synaptic said many things
    needed it (50+).

    So now I am stuck. I can't install the missing dependency. And
    therefore I can not install python 3.1.2.

    **Any ideas on how to fix the missing libsqlite3-dev dependency?**
    Trevor, Jun 16, 2010
    #1
    1. Advertising

  2. On Wed, Jun 16, 2010 at 10:29 AM, Trevor <> wrote:
    > Running ubuntu 9.04 "jaunty".
    >
    > When I run make I get the following error:
    >
    >    Python build finished, but the necessary bits to build these
    > modules were not found:
    >    _sqlite3
    >
    >
    > So the easy solution is to just install the missing dependency using
    > apt-get, "sudo apt-get -f install libsqlite3-dev" but I get the
    > following error:
    >
    >    The following packages have unmet dependencies:
    >      libsqlite3-dev: Depends: libsqlite3-0 (= 3.6.10-1) but
    > 3.6.10-1ubuntu0.2 is to be installed
    >    E: Broken packages
    >
    > I tried uninstalling "libsqlite3-0" but synaptic said many things
    > needed it (50+).
    >
    > So now I am stuck. I can't install the missing dependency. And
    > therefore I can not install python 3.1.2.
    >
    > **Any ideas on how to fix the missing libsqlite3-dev dependency?**



    Make sure that the jaunty-updates repository is enabled in Software
    Sources. 3.6.10-1 is the latest version in the normal jaunty
    repository, 3.6.10-1ubuntu0.2 is the latest version in the
    jaunty-updates repo.

    If that still doesn't work, just download the appropriate deb directly
    from http://packages.ubuntu.com/jaunty-updates/libsqlite3-dev
    Benjamin Kaplan, Jun 16, 2010
    #2
    1. Advertising

  3. On 06/16/2010 07:29 PM, Trevor wrote:
    > Running ubuntu 9.04 "jaunty".
    >
    > When I run make I get the following error:
    >
    > Python build finished, but the necessary bits to build these
    > modules were not found:
    > _sqlite3
    >
    >
    > So the easy solution is to just install the missing dependency using
    > apt-get, "sudo apt-get -f install libsqlite3-dev" but I get the
    > following error:
    >
    > The following packages have unmet dependencies:
    > libsqlite3-dev: Depends: libsqlite3-0 (= 3.6.10-1) but
    > 3.6.10-1ubuntu0.2 is to be installed
    > E: Broken packages
    >
    > I tried uninstalling "libsqlite3-0" but synaptic said many things
    > needed it (50+).
    >
    > So now I am stuck. I can't install the missing dependency. And
    > therefore I can not install python 3.1.2.


    you can, in fact, install Python. It does not, as such, depend on
    sqlite. You will of course be missing the sqlite module, but if you can
    live without that, there's no problem.

    >
    > **Any ideas on how to fix the missing libsqlite3-dev dependency?**


    if there is no libsqlite3-dev package for
    libsqlite3-0-3.6.10-1ubuntu0.2, then you could either

    * find a copy of libsqlite3-0-3.6.10-1 (the version which
    libsqlite3-dev appears to require), download it and downgrade
    manually with dpkg -i

    * extract the contents of the -dev package manually. Should work, but
    you'll run into problems if you ever upgrade the system to a newer
    ubuntu release.

    * get the source package and build new packages from that. You'll
    need to install build-essential and find a good howto somewhere.


    Thomas
    Thomas Jollans, Jun 16, 2010
    #3
  4. Re: Installing Python 3.1.2 from source,how do you resolve the sqlite3-dev dependency?

    On Jun 16, 2010, at 1:29 PM, Trevor wrote:

    > Running ubuntu 9.04 "jaunty".
    >
    > When I run make I get the following error:
    >
    > Python build finished, but the necessary bits to build these
    > modules were not found:
    > _sqlite3
    >
    >
    > So the easy solution is to just install the missing dependency using
    > apt-get, "sudo apt-get -f install libsqlite3-dev" but I get the
    > following error:
    >
    > The following packages have unmet dependencies:
    > libsqlite3-dev: Depends: libsqlite3-0 (= 3.6.10-1) but
    > 3.6.10-1ubuntu0.2 is to be installed
    > E: Broken packages
    >
    > I tried uninstalling "libsqlite3-0" but synaptic said many things
    > needed it (50+).
    >
    > So now I am stuck. I can't install the missing dependency. And
    > therefore I can not install python 3.1.2.
    >
    > **Any ideas on how to fix the missing libsqlite3-dev dependency?**


    Hi Trevor,
    I'm a Mac guy using Python 2.x, but a solution that I found might work
    for you too.

    Python can link to SQLite statically or dynamically. I needed my
    Python to use a specific (old) version of SQLite, different from the
    one shipped with OS X. I downloaded the SQLite version I needed and
    compiled it like this:

    sudo ./configure --enable-threadsafe --enable-tempstore --enable-
    shared=no --enable-static=yes

    That created these static-friendly libs in /usr/local/lib:
    libsqlite3.a
    libsqlite3.la

    So far, so good. Now comes the ugly part...I was unable to find a
    configure/Makefile option to force Python to link SQLite statically. I
    was working with Python 2.x, and maybe there's a way to do it that I
    just didn't find, or maybe Python 3.x offers that option. The trick I
    had to resort to was to temporarily rename all of the SQLite dynamic
    libraries on my system and then rebuild Python. Since Python only
    found the SQLite static libs, it linked them into the Python binary.
    After that I could undo my renaming of the SQLite dynamic libs and
    restore my system to normal. Good thing nothing was trying to load
    those libraries while I had them renamed!

    Obviously this is a crude process and there's probably a better way to
    do it. In fact, I encourage you to look for a better way to do it and
    let us know about it. That way I won't have to risk screwing up my OS
    by renaming system libraries. =)

    Good luck
    Philip
    Philip Semanchuk, Jun 16, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brent L Johnson

    Installing RPM rebuild and failed dependency

    Brent L Johnson, Feb 20, 2004, in forum: Python
    Replies:
    1
    Views:
    329
    Christian Haugan Toldnes
    Feb 20, 2004
  2. Replies:
    1
    Views:
    10,154
  3. Vincent Davis
    Replies:
    0
    Views:
    230
    Vincent Davis
    Jun 20, 2010
  4. Robert Kern
    Replies:
    0
    Views:
    503
    Robert Kern
    Jun 20, 2010
  5. Marc Aymerich
    Replies:
    0
    Views:
    181
    Marc Aymerich
    Mar 22, 2011
Loading...

Share This Page