Missing sqlite3 after Python3 compile

后端 未结 3 1286
暖寄归人
暖寄归人 2021-01-02 22:09

My question is much like several others. Having manually compiled Python, sqlite3 is missing:

\"enter

相关标签:
3条回答
  • 2021-01-02 22:29

    After apt-get install libsqlite3-dev

    then

    ./configure --prefix=/opt/python3.7.4 --with-ssl --with-pydebug
    
    make
    make install
    

    Note: You might need apt-get install libssl-dev aslo, openssl version must above 1.0.2 if you are compiling python3.7

    For me, I'm using ubuntu 14.04 (trusty) I can't find a libssl-dev package to meet the requirement compiling python3.7 with ssl support. I modify my /etc/apt/sourcelist.d

    deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
    deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
    

    after install a newer libssl-dev, then change it back to the original one

    deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted
    deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted
    
    0 讨论(0)
  • 2021-01-02 22:46

    If you only have limited user access (no root or sudo permission) you can install to a local, user accessible, environment like so:

    tar -xvf sqlite-autoconf-3270200.tar.gz
    cd sqlite-autoconf-3270200
    ./configure --prefix=$HOME/.local
    make && make install
    

    This will install on your ~/.local tree.

    Add ~/.local/bin to your path if missing.

    0 讨论(0)
  • 2021-01-02 22:52

    You need to install libsqlite3 (Debian based) or sqlite-devel (RedHat based) and the associated header files before compiling Python because Python needs to find them during the compile process.

    Did you make sure to run:

    1. ./configure
    2. make
    3. make install

    In this specific order? With no missing steps?

    0 讨论(0)
提交回复
热议问题