I want to install a package in Ubuntu 14.04, but every time I run the ./configure
command it gives me this error:
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 35%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 70%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 100%
dpkg: error: cannot scan updates directory `/var/lib/dpkg/updates/': No such file or directory
E: Sub-process /usr/bin/dpkg returned an error code (2)
Best Answer
It seems you have done something terrible to the directory
/var/lib/dpkg
refer to this posts here to know more aboutdpkg
This and ThisBack to your problem, to solve the problem, you should try doing the following,
First Option
Return the dir
status
only if it was the one messed up.Then do
Then install the packages as normal
Second Option(This solution assume you have completely messed up with
/var/lib/dpkg
Restore a backup of
/dpkg/status/
from/var/backups/
or/var/lib/dpkg/
sincestatus
holds the database ofdpkg
,you will probably be able to restore the database and everything will turn back to normal.In the dir
/var/backups/
you will be having a folder likedpkg.status.0
,and compressed filedpkg.status.1
,dpkg.status.2
etc,this are the backups we are targeting,we are going to use backupdpkg.status.0
to restore,do the following:Since you already have dir
/var/lib/dpkg
Copy the backup to that dir
NOTE:The latest backup is
dpkg.status.0
file,but If you want to backup from the archive file i.e.dpkg.status.#.gz
doThen rename
dpkg.status.#
tostatus
i.e.dpkg.status.0
Then create the folder
update
Then
sudo apt-get update
andsudo apt-get upgrade
After that you can install the softwares as normal!