How to recover yum/dnf/rpm after uninstall Sqlite?
I removed Anki package from my computer for reinstall purposes and this bad designed package removed a lot of important packages from my Fedora 22, including Sqlite.
Now my system is broken and I can't run rpm
, yum
or dnf
. I was trying to download sqlite and sqlite3-devel package at RPMFind and it didn't work, because rpm is broken too. What can I do to save my broken system?
When I try to install sqlite via dnf:
[paladini@starstuff Documents]$ sudo dnf install sqlite
error: Failed to initialize NSS library
Traceback (most recent call last):
File "/bin/dnf", line 35, in <module>
from dnf.cli import main
File "/usr/lib/python2.7/site-packages/dnf/__init__.py", line 31, in <module>
import dnf.base
File "/usr/lib/python2.7/site-packages/dnf/base.py", line 29, in <module>
from dnf.yum import history
File "/usr/lib/python2.7/site-packages/dnf/yum/history.py", line 26, in <module>
from .sqlutils import sqlite, executeSQL, sql_esc_glob
File "/usr/lib/python2.7/site-packages/dnf/yum/sqlutils.py", line 26, in <module>
import sqlite
ImportError: No module named sqlite
When I try to install sqlite module for Python:
[paladini@starstuff Downloads]$ sudo pip install pysqlite
gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/src/module.o build/temp.linux-x86_64-2.7/src/connection.o build/temp.linux-x86_64-2.7/src/cursor.o build/temp.linux-x86_64-2.7/src/cache.o build/temp.linux-x86_64-2.7/src/microprotocols.o build/temp.linux-x86_64-2.7/src/prepare_protocol.o build/temp.linux-x86_64-2.7/src/statement.o build/temp.linux-x86_64-2.7/src/util.o build/temp.linux-x86_64-2.7/src/row.o -L/usr/lib64 -lpython2.7 -lsqlite3 -o build/lib.linux-x86_64-2.7/pysqlite2/_sqlite.so
/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-wh1uoJ/pysqlite/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4zXdsz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-wh1uoJ/pysqlite
When I try to install sqlite via rpm:
[paladini@starstuff Downloads]$ rpm -i sqlite-3.8.11-1.fc22.x86_64.rpm
error: Failed to initialize NSS library
I also tried to install sqlite from source, but Sqlite don't provide a good way to do that. The "source" version just includes some .h and .c files, nothing more, nothing less. No readme, no makefile. The pre-compiled version just include a "sqlite" executable that I've moved into /usr/bin, without effects.
What can I do? Please, help me! And yes, I can download and make a Fedora LiveCD, just don't know what to do.