centos ModuleNotFoundError: No module named ‘_sqlite3’

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

This error may be due to not finding the installation directory of SQLite or not installing when installing python

For Python 3:

1. If it is installed, find out the installation directory and configure the environment variable

Add environment variable: VI/etc/profile

export LD_LIBRARY_PATH=/usr/local/lib

Modify the python installation file setup. Py and write the SQLite installation directory to someone else

Re install Python

wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
tar -zxvf Python-3.6.4.tgz
cd Python-3.6.4
./configure /usr/python360
make && make install

mv /usr/bin/python /usr/bin/python_bak
ln -s /usr/python360/bin/python3.6 /usr/bin/python

2. If you are not sure of the directory or are not installed, you can re install SQLite3:

wget http://www.sqlite.org/snapshot/sqlite-snapshot-201801161337.tar.gz
tar -zxvf sqlite-snapshot-201801161337.tar.gz
cd sqlite-snapshot-201801161337
./configure --prefix=/usr/local
make && make install

Add environment variable: VI/etc/profile

export LD_LIBRARY_PATH=/usr/local/lib

Re install Python

wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
tar -zxvf Python-3.6.4.tgz
cd Python-3.6.4
./configure /usr/python360
make && make install

mv /usr/bin/python /usr/bin/python_bak
ln -s /usr/python360/bin/python3.6 /usr/bin/python

If it’s Python 2.7:

Then copy the python of CentOS to the node

Similar Posts: