Can not unlock

Asked by Nishant on 2016-06-06

nishant@Nishant:~$ ubuntu-support-status
Support status summary of 'Nishant':

You have 35 packages (2.0%) supported until February 2015 (9m)
You have 25 packages (1.4%) supported until May 2017 (3y)
You have 1660 packages (93.4%) supported until May 2019 (5y)
You have 50 packages (2.8%) supported until March 2017 (9m)

You have 0 packages (0.0%) that can not/no-longer be downloaded
You have 7 packages (0.4%) that are unsupported

Run with --show-unsupported, --show-supported or --show-all to see more details
nishant@Nishant:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
nishant@Nishant:~$ dpkg --print-foreign-architectures
i386
nishant@Nishant:~$ sudo grep -R proxy /etc/apt/*
[sudo] password for nishant:
/etc/apt/apt.conf:Acquire::http::proxy "http://10.10.78.22:3128/";
/etc/apt/apt.conf:Acquire::https::proxy "https://10.10.78.22:3128/";
/etc/apt/apt.conf:Acquire::ftp::proxy "ftp://10.10.78.22:3128/";
/etc/apt/apt.conf:Acquire::socks::proxy "socks://10.10.78.22:3128/";
nishant@Nishant:~$ grep proxy /etc/environment
http_proxy="http://10.10.78.22:3128/"
https_proxy="https://10.10.78.22:3128/"
ftp_proxy="ftp://10.10.78.22:3128/"
socks_proxy="socks://10.10.78.22:3128/"
nishant@Nishant:~$ echo $http_proxy
http://10.10.78.22:3128/
nishant@Nishant:~$ echo $ftp_proxy
ftp://10.10.78.22:3128/
nishant@Nishant:~$ grep proxy /etc/bash.bashrc
nishant@Nishant:~$ grep proxy ~/.bashrc
nishant@Nishant:~$ cat /etc/apt/apt.conf
Acquire::http::proxy "http://10.10.78.22:3128/";
Acquire::https::proxy "https://10.10.78.22:3128/";
Acquire::ftp::proxy "ftp://10.10.78.22:3128/";
Acquire::socks::proxy "socks://10.10.78.22:3128/";
nishant@Nishant:~$ sudo fuser -vvv /var/lib/dpkg/lock
nishant@Nishant:~$ sudo fuser -vvv /var/cache/apt/archives/lock
nishant@Nishant:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
nishant@Nishant:~$ uname -a
Linux Nishant 3.16.0-71-generic #92~14.04.1-Ubuntu SMP Thu May 12 23:31:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
nishant@Nishant:~$ sudo rm /var/lib/apt/lists/lock
nishant@Nishant:~$ sudo rm /var/cache/apt/archives/lock
nishant@Nishant:~$ sudo rm /var/lib/dpkg/lock
nishant@Nishant:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
nishant@Nishant:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
nishant@Nishant:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
nishant@Nishant:~$ sudo rm -rf /var/lib/dpkg/updates/*
nishant@Nishant:~$ sudo rm -rf /var/lib/apt/lists
nishant@Nishant:~$ sudo rm /var/cache/apt/*.bin
nishant@Nishant:~$ sudo mkdir /var/lib/apt/lists
nishant@Nishant:~$ sudo mkdir /var/lib/apt/lists/partial
nishant@Nishant:~$ LANG=C;sudo apt-get clean
nishant@Nishant:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Error!
E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory)
E: The package lists or status file could not be parsed or opened.
nishant@Nishant:~$ sudo dpkg --configure -a
dpkg: error: failed to open package info file `/var/lib/dpkg/status' for reading: No such file or directory
nishant@Nishant:~$ sudo dpkg --clear-avail
nishant@Nishant:~$ LANG=C;sudo apt-get -f install
Reading package lists... Error!
E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory)
E: The package lists or status file could not be parsed or opened.
nishant@Nishant:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Error!
E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory)
E: The package lists or status file could not be parsed or opened.
nishant@Nishant:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Error!
E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory)
E: The package lists or status file could not be parsed or opened.
nishant@Nishant:~$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Get:2 http://archive.ubuntu.com trusty-backports InRelease [65.9 kB]
Get:3 http://archive.ubuntu.com trusty-security InRelease [65.9 kB]
Get:4 http://archive.ubuntu.com trusty Release.gpg [933 B]
Get:5 http://archive.ubuntu.com trusty-updates/main Sources [276 kB]
Get:6 http://archive.ubuntu.com trusty-updates/restricted Sources [5352 B]
Get:7 http://archive.ubuntu.com trusty-updates/universe Sources [156 kB]
Get:8 http://archive.ubuntu.com trusty-updates/multiverse Sources [5939 B]
Get:9 http://archive.ubuntu.com trusty-updates/main amd64 Packages [773 kB]
Get:10 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [15.9 kB]
Get:11 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [361 kB]
Get:12 http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages [13.2 kB]
Get:13 http://archive.ubuntu.com trusty-updates/main i386 Packages [740 kB]
Get:14 http://archive.ubuntu.com trusty-updates/restricted i386 Packages [15.6 kB]
Get:15 http://archive.ubuntu.com trusty-updates/universe i386 Packages [363 kB]
Get:16 http://archive.ubuntu.com trusty-updates/multiverse i386 Packages [13.6 kB]
Get:17 http://archive.ubuntu.com trusty-updates/main Translation-en [387 kB]
Get:18 http://archive.ubuntu.com trusty-updates/multiverse Translation-en [7227 B]
Get:19 http://archive.ubuntu.com trusty-updates/restricted Translation-en [3699 B]
Get:20 http://archive.ubuntu.com trusty-updates/universe Translation-en [189 kB]
Get:21 http://archive.ubuntu.com trusty-backports/main Sources [9553 B]
Get:22 http://archive.ubuntu.com trusty-backports/restricted Sources [28 B]
Get:23 http://archive.ubuntu.com trusty-backports/universe Sources [35.2 kB]
Get:24 http://archive.ubuntu.com trusty-backports/multiverse Sources [1898 B]
Get:25 http://archive.ubuntu.com trusty-backports/main amd64 Packages [13.0 kB]
Get:26 http://archive.ubuntu.com trusty-backports/restricted amd64 Packages [28 B]
Get:27 http://archive.ubuntu.com trusty-backports/universe amd64 Packages [43.1 kB]
Get:28 http://archive.ubuntu.com trusty-backports/multiverse amd64 Packages [1571 B]
Get:29 http://archive.ubuntu.com trusty-backports/main i386 Packages [13.1 kB]
Get:30 http://archive.ubuntu.com trusty-backports/restricted i386 Packages [28 B]
Get:31 http://archive.ubuntu.com trusty-backports/universe i386 Packages [43.2 kB]
Get:32 http://archive.ubuntu.com trusty-backports/multiverse i386 Packages [1552 B]
Get:33 http://archive.ubuntu.com trusty-backports/main Translation-en [7370 B]
Get:34 http://archive.ubuntu.com trusty-backports/multiverse Translation-en [1215 B]
Get:35 http://archive.ubuntu.com trusty-backports/restricted Translation-en [28 B]
Get:36 http://archive.ubuntu.com trusty-backports/universe Translation-en [36.8 kB]
Get:37 http://archive.ubuntu.com trusty-security/main Sources [117 kB]
Get:38 http://archive.ubuntu.com trusty-security/restricted Sources [4035 B]
Get:39 http://archive.ubuntu.com trusty-security/universe Sources [37.3 kB]
Get:40 http://archive.ubuntu.com trusty-security/multiverse Sources [2760 B]
Get:41 http://archive.ubuntu.com trusty-security/main amd64 Packages [485 kB]
Get:42 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [13.0 kB]
Get:43 http://archive.ubuntu.com trusty-security/universe amd64 Packages [130 kB]
Get:44 http://archive.ubuntu.com trusty-security/multiverse amd64 Packages [4978 B]
Get:45 http://archive.ubuntu.com trusty-security/main i386 Packages [458 kB]
Get:46 http://archive.ubuntu.com trusty-security/restricted i386 Packages [12.7 kB]
Get:47 http://archive.ubuntu.com trusty-security/universe i386 Packages [130 kB]
Get:48 http://archive.ubuntu.com trusty-security/multiverse i386 Packages [5168 B]
Get:49 http://archive.ubuntu.com trusty-security/main Translation-en [266 kB]
Get:50 http://archive.ubuntu.com trusty-security/multiverse Translation-en [2570 B]
Get:51 http://archive.ubuntu.com trusty-security/restricted Translation-en [3206 B]
Get:52 http://archive.ubuntu.com trusty-security/universe Translation-en [76.6 kB]
Get:53 http://archive.ubuntu.com trusty Release [58.5 kB]
Get:54 http://archive.ubuntu.com trusty/main Sources [1064 kB]
Get:55 http://archive.ubuntu.com trusty/restricted Sources [5433 B]
Get:56 http://archive.ubuntu.com trusty/universe Sources [6399 kB]
Get:57 http://archive.ubuntu.com trusty/multiverse Sources [174 kB]
Get:58 http://archive.ubuntu.com trusty/main amd64 Packages [1350 kB]
Get:59 http://archive.ubuntu.com trusty/restricted amd64 Packages [13.0 kB]
Get:60 http://archive.ubuntu.com trusty/universe amd64 Packages [5859 kB]
Get:61 http://archive.ubuntu.com trusty/multiverse amd64 Packages [132 kB]
Get:62 http://archive.ubuntu.com trusty/main i386 Packages [1348 kB]
Get:63 http://archive.ubuntu.com trusty/restricted i386 Packages [13.4 kB]
Get:64 http://archive.ubuntu.com trusty/universe i386 Packages [5866 kB]
Get:65 http://archive.ubuntu.com trusty/multiverse i386 Packages [134 kB]
Get:66 http://archive.ubuntu.com trusty/main Translation-en [762 kB]
Get:67 http://archive.ubuntu.com trusty/multiverse Translation-en [102 kB]
Get:68 http://archive.ubuntu.com trusty/restricted Translation-en [3457 B]
Get:69 http://archive.ubuntu.com trusty/universe Translation-en [4089 kB]
Fetched 32.9 MB in 4min 5s (134 kB/s)
Reading package lists... Error!
E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory)
E: The package lists or status file could not be parsed or opened.
nishant@Nishant:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade
Ign http://archive.ubuntu.com trusty InRelease
Hit http://archive.ubuntu.com trusty-updates InRelease
Hit http://archive.ubuntu.com trusty-backports InRelease
Hit http://archive.ubuntu.com trusty-security InRelease
Hit http://archive.ubuntu.com trusty Release.gpg
Hit http://archive.ubuntu.com trusty-updates/main Sources
Hit http://archive.ubuntu.com trusty-updates/restricted Sources
Hit http://archive.ubuntu.com trusty-updates/universe Sources
Hit http://archive.ubuntu.com trusty-updates/multiverse Sources
Hit http://archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/main i386 Packages
Hit http://archive.ubuntu.com trusty-updates/restricted i386 Packages
Hit http://archive.ubuntu.com trusty-updates/universe i386 Packages
Hit http://archive.ubuntu.com trusty-updates/multiverse i386 Packages
Hit http://archive.ubuntu.com trusty-updates/main Translation-en
Hit http://archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://archive.ubuntu.com trusty-backports/main Sources
Hit http://archive.ubuntu.com trusty-backports/restricted Sources
Hit http://archive.ubuntu.com trusty-backports/universe Sources
Hit http://archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://archive.ubuntu.com trusty-backports/main amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/main i386 Packages
Hit http://archive.ubuntu.com trusty-backports/restricted i386 Packages
Hit http://archive.ubuntu.com trusty-backports/universe i386 Packages
Hit http://archive.ubuntu.com trusty-backports/multiverse i386 Packages
Hit http://archive.ubuntu.com trusty-backports/main Translation-en
Hit http://archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://archive.ubuntu.com trusty-security/main Sources
Hit http://archive.ubuntu.com trusty-security/restricted Sources
Hit http://archive.ubuntu.com trusty-security/universe Sources
Hit http://archive.ubuntu.com trusty-security/multiverse Sources
Hit http://archive.ubuntu.com trusty-security/main amd64 Packages
Hit http://archive.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty-security/universe amd64 Packages
Hit http://archive.ubuntu.com trusty-security/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty-security/main i386 Packages
Hit http://archive.ubuntu.com trusty-security/restricted i386 Packages
Hit http://archive.ubuntu.com trusty-security/universe i386 Packages
Hit http://archive.ubuntu.com trusty-security/multiverse i386 Packages
Hit http://archive.ubuntu.com trusty-security/main Translation-en
Hit http://archive.ubuntu.com trusty-security/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-security/restricted Translation-en
Hit http://archive.ubuntu.com trusty-security/universe Translation-en
Hit http://archive.ubuntu.com trusty Release
Hit http://archive.ubuntu.com trusty/main Sources
Hit http://archive.ubuntu.com trusty/restricted Sources
Hit http://archive.ubuntu.com trusty/universe Sources
Hit http://archive.ubuntu.com trusty/multiverse Sources
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Hit http://archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty/main i386 Packages
Hit http://archive.ubuntu.com trusty/restricted i386 Packages
Hit http://archive.ubuntu.com trusty/universe i386 Packages
Hit http://archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/multiverse Translation-en
Hit http://archive.ubuntu.com trusty/restricted Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en
Reading package lists... Error!
E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory)
E: The package lists or status file could not be parsed or opened.
nishant@Nishant:~$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list

     1 # deb cdrom:[Ubuntu 14.04.2 LTS _Trusty Tahr_ - Release amd64 (20150218.1)]/ trusty main restricted
     2
     3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     4 # newer versions of the distribution.
     5 deb http://archive.ubuntu.com/ubuntu trusty main restricted
     6 deb-src http://archive.ubuntu.com/ubuntu trusty main restricted
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted
    11 deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted
    12
    13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    14 ## team. Also, please note that software in universe WILL NOT receive any
    15 ## review or updates from the Ubuntu security team.
    16 deb http://archive.ubuntu.com/ubuntu trusty universe
    17 deb-src http://archive.ubuntu.com/ubuntu trusty universe
    18 deb http://archive.ubuntu.com/ubuntu trusty-updates universe
    19 deb-src http://archive.ubuntu.com/ubuntu trusty-updates universe
    20
    21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    22 ## team, and may not be under a free licence. Please satisfy yourself as to
    23 ## your rights to use the software. Also, please note that software in
    24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    25 ## security team.
    26 deb http://archive.ubuntu.com/ubuntu trusty multiverse
    27 deb-src http://archive.ubuntu.com/ubuntu trusty multiverse
    28 deb http://archive.ubuntu.com/ubuntu trusty-updates multiverse
    29 deb-src http://archive.ubuntu.com/ubuntu trusty-updates multiverse
    30
    31 ## N.B. software from this repository may not have been tested as
    32 ## extensively as that contained in the main release, although it includes
    33 ## newer versions of some applications which may provide useful features.
    34 ## Also, please note that software in backports WILL NOT receive any review
    35 ## or updates from the Ubuntu security team.
    36 deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
    37 deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
    38
    39 deb http://archive.ubuntu.com/ubuntu trusty-security main restricted
    40 deb-src http://archive.ubuntu.com/ubuntu trusty-security main restricted
    41 deb http://archive.ubuntu.com/ubuntu trusty-security universe
    42 deb-src http://archive.ubuntu.com/ubuntu trusty-security universe
    43 deb http://archive.ubuntu.com/ubuntu trusty-security multiverse
    44 deb-src http://archive.ubuntu.com/ubuntu trusty-security multiverse
    45
    46 ## Uncomment the following two lines to add software from Canonical's
    47 ## 'partner' repository.
    48 ## This software is not part of Ubuntu, but is offered by Canonical and the
    49 ## respective vendors as a service to Ubuntu users.
    50 # deb http://archive.canonical.com/ubuntu trusty partner
    51 # deb-src http://archive.canonical.com/ubuntu trusty partner
    52
    53 ## This software is not part of Ubuntu, but is offered by third-party
    54 ## developers who want to ship their latest software.
    55 # deb http://extras.ubuntu.com/ubuntu trusty main
    56 # deb-src http://extras.ubuntu.com/ubuntu trusty main
nishant@Nishant:~$ sudo dpkg --audit
dpkg: error: failed to open package info file `/var/lib/dpkg/status' for reading: No such file or directory

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
2016-06-06
Last reply:
2016-06-06

cd $HOME
wget https://dl.dropbox.com/u/8850924/fixpackage
chmod +x ./fixpackage
sudo ./fixpackage

hope that helps.

Manfred Hampl (m-hampl) said : #2

You omitted one of the commands of the troubleshooting procedure

sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status

(actionparsnip's procedure should help.)

I'm lazy so I scripted it. Super easy

Can you help with this problem?

Provide an answer of your own, or ask Nishant for more information if necessary.

To post a message you must log in.