I was running the command sudo apt install mongodb-org
. And I got these errors.
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 31%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 63%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 94%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 100%
dpkg: error: unable to create new file '/var/lib/dpkg/info/format-new': No such
file or directory
E: Sub-process /usr/bin/dpkg returned an error code (2)
I am using Ubuntu 20.04.
Output of ls -ls /var/lib/dpkg/info/{,format-new} | head -n2
ls: cannot access '/var/lib/dpkg/info/': No such file or directory
ls: cannot access '/var/lib/dpkg/info/format-new': No such file or directory
Output of apt-cache policy debconf
debconf:
Installed: (none)
Candidate: 1.5.73
Version table:
1.5.73 500
500 http://in.archive.ubuntu.com/ubuntu focal/main amd64 Packages