I can't use the "sudo apt-get" command to upgrade Ubuntu, this is after upgrading to WW

Asked by Felin

felin@theAnarchist:~$ sudo apt-get upgrade
[sudo] password for felin:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
felin@theAnarchist:~$ ubuntu-support-status
cat /etc/dpkg/dpkg.cfg.Support status summary of 'theAnarchist':

You have 1923 packages (81.8%) supported until July 2016 (9m)

You have 133 packages (5.7%) that can not/no-longer be downloaded
You have 294 packages (12.5%) that are unsupported

Run with --show-unsupported, --show-supported or --show-all to see more details
felin@theAnarchist:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
felin@theAnarchist:~$ dpkg --print-foreign-architectures
i386
felin@theAnarchist:~$ sudo grep -R proxy /etc/apt
felin@theAnarchist:~$ grep proxy /etc/environment
felin@theAnarchist:~$ echo $http_proxy

felin@theAnarchist:~$ echo $ftp_proxy

felin@theAnarchist:~$ grep proxy /etc/bash.bashrc
felin@theAnarchist:~$ grep proxy ~/.bashrc
felin@theAnarchist:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
felin@theAnarchist:~$ sudo fuser -vvv /var/lib/dpkg/lock
                     USER PID ACCESS COMMAND
/var/lib/dpkg/lock: root 2261 F.... aptd
felin@theAnarchist:~$ sudo fuser -vvv /var/cache/apt/archives/lock
                     USER PID ACCESS COMMAND
/var/cache/apt/archives/lock:
                     root 2261 F.... aptd
felin@theAnarchist:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"
felin@theAnarchist:~$ uname -a
Linux theAnarchist 3.19.0-49-generic #55~14.04.1-Ubuntu SMP Fri Jan 22 11:24:31 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
felin@theAnarchist:~$ sudo rm /var/cache/apt/archives/lock
felin@theAnarchist:~$ sudo rm /var/lib/dpkg/lock
felin@theAnarchist:~$ sudo cp -arf /var/lib/dpkg/status /var/lib/dpkg/status-badfelin@theAnarchist:~$ sudo cp -arf /var/lib/dpkg.backup
cp: missing destination file operand after ‘/var/lib/dpkg.backup’
Try 'cp --help' for more information.
felin@theAnarchist:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-badfelinfelin@theAnarchist:~$ sudo cp /var/lib/dpkg/status-old /var/lin/dpkg/status || sudo cp/var/backups/apt/extended_states.0/var/lib/dpkg/status
cp: cannot create regular file ‘/var/lin/dpkg/status’: No such file or directory
sudo: cp/var/backups/apt/extended_states.0/var/lib/dpkg/status: command not found
felin@theAnarchist:~$ sudo mv /var/li/dpkg/available /var/lib/dpkg/availale-bad
mv: cannot stat ‘/var/li/dpkg/available’: No such file or directory
felin@theAnarchist:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/availale-bad
felin@theAnarchist:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
felin@theAnarchist:~$ sudo rm -rf /var/lib/dpkg/updates/*
felin@theAnarchist:~$ sudo rm -rf /var/lib/apt/lists
felin@theAnarchist:~$ sudo rm /var/cache/apt/*.bin
felin@theAnarchist:~$ sudo mkdit /var/lib/apt/lists
sudo: mkdit: command not found
felin@theAnarchist:~$ sudo mkdir /var/lib/apt/lists
felin@theAnarchist:~$ sudo mkdir /var/lib/apt/lists/partial
felin@theAnarchist:~$ LANG=C;sudo apt-get clean
felin@theAnarchist:~$ 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.
felin@theAnarchist:~$ sudo dpkg --configure -a
dpkg: error: failed to open package info file '/var/lib/dpkg/status' for reading: No such file or directory
felin@theAnarchist:~$ sudo dpkg --clear-avail
felin@theAnarchist:~$ 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.
felin@theAnarchist:~$ 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.
felin@theAnarchist:~$ 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.
felin@theAnarchist:~$ 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.
felin@theAnarchist:~$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
Get:1 http://archive.canonical.com wily InRelease [10.3 kB]
Get:2 http://archive.ubuntu.com wily InRelease [218 kB]
Get:3 http://archive.canonical.com wily/partner Sources [2,494 B]
Get:4 http://archive.canonical.com wily/partner amd64 Packages [2,971 B]
Get:5 http://archive.canonical.com wily/partner i386 Packages [3,324 B]
Get:6 http://archive.canonical.com wily/partner Translation-en [1,543 B]
Get:7 http://archive.ubuntu.com wily-updates InRelease [65.9 kB]
Get:8 http://archive.ubuntu.com wily-backports InRelease [64.5 kB]
Get:9 http://archive.ubuntu.com wily-security InRelease [65.9 kB]
Get:10 http://archive.ubuntu.com wily-proposed InRelease [65.9 kB]
Get:11 http://archive.ubuntu.com wily/main Sources [1,118 kB]
Get:12 http://archive.ubuntu.com wily/restricted Sources [7,181 B]
Get:13 http://archive.ubuntu.com wily/universe Sources [7,238 kB]
Get:14 http://archive.ubuntu.com wily/multiverse Sources [178 kB]
Get:15 http://archive.ubuntu.com wily/main amd64 Packages [1,420 kB]
Get:16 http://archive.ubuntu.com wily/restricted amd64 Packages [15.6 kB]
Get:17 http://archive.ubuntu.com wily/universe amd64 Packages [6,704 kB]
Get:18 http://archive.ubuntu.com wily/multiverse amd64 Packages [138 kB]
Get:19 http://archive.ubuntu.com wily/main i386 Packages [1,416 kB]
Get:20 http://archive.ubuntu.com wily/restricted i386 Packages [16.0 kB]
Get:21 http://archive.ubuntu.com wily/universe i386 Packages [6,701 kB]
Get:22 http://archive.ubuntu.com wily/multiverse i386 Packages [139 kB]
Get:23 http://archive.ubuntu.com wily/main Translation-en [839 kB]
Get:24 http://archive.ubuntu.com wily/multiverse Translation-en [107 kB]
Get:25 http://archive.ubuntu.com wily/restricted Translation-en [4,296 B]
Get:26 http://archive.ubuntu.com wily/universe Translation-en [4,579 kB]
Get:27 http://archive.ubuntu.com wily-updates/main Sources [48.3 kB]
Get:28 http://archive.ubuntu.com wily-updates/restricted Sources [3,741 B]
Get:29 http://archive.ubuntu.com wily-updates/universe Sources [14.1 kB]
Get:30 http://archive.ubuntu.com wily-updates/multiverse Sources [2,772 B]
Get:31 http://archive.ubuntu.com wily-updates/main amd64 Packages [130 kB]
Get:32 http://archive.ubuntu.com wily-updates/restricted amd64 Packages [13.3 kB]
Get:33 http://archive.ubuntu.com wily-updates/universe amd64 Packages [60.0 kB]
Get:34 http://archive.ubuntu.com wily-updates/multiverse amd64 Packages [6,249 B]
Get:35 http://archive.ubuntu.com wily-updates/main i386 Packages [127 kB]
Get:36 http://archive.ubuntu.com wily-updates/restricted i386 Packages [13.4 kB]
Get:37 http://archive.ubuntu.com wily-updates/universe i386 Packages [57.3 kB]
Get:38 http://archive.ubuntu.com wily-updates/multiverse i386 Packages [6,434 B]
Get:39 http://archive.ubuntu.com wily-updates/main Translation-en [64.8 kB]
Get:40 http://archive.ubuntu.com wily-updates/multiverse Translation-en [2,806 B]
Get:41 http://archive.ubuntu.com wily-updates/restricted Translation-en [3,024 B]
Get:42 http://archive.ubuntu.com wily-updates/universe Translation-en [38.6 kB]
Get:43 http://archive.ubuntu.com wily-backports/main Sources [754 B]
Get:44 http://archive.ubuntu.com wily-backports/restricted Sources [28 B]
Get:45 http://archive.ubuntu.com wily-backports/universe Sources [1,808 B]
Get:46 http://archive.ubuntu.com wily-backports/multiverse Sources [28 B]
Get:47 http://archive.ubuntu.com wily-backports/main amd64 Packages [618 B]
Get:48 http://archive.ubuntu.com wily-backports/restricted amd64 Packages [28 B]
Get:49 http://archive.ubuntu.com wily-backports/universe amd64 Packages [1,685 B]
Get:50 http://archive.ubuntu.com wily-backports/multiverse amd64 Packages [28 B]
Get:51 http://archive.ubuntu.com wily-backports/main i386 Packages [618 B]
Get:52 http://archive.ubuntu.com wily-backports/restricted i386 Packages [28 B]
Get:53 http://archive.ubuntu.com wily-backports/universe i386 Packages [1,680 B]
Get:54 http://archive.ubuntu.com wily-backports/multiverse i386 Packages [28 B]
Get:55 http://archive.ubuntu.com wily-backports/main Translation-en [496 B]
Get:56 http://archive.ubuntu.com wily-backports/multiverse Translation-en [28 B]
Get:57 http://archive.ubuntu.com wily-backports/restricted Translation-en [28 B]
Get:58 http://archive.ubuntu.com wily-backports/universe Translation-en [1,245 B]
Get:59 http://archive.ubuntu.com wily-security/main Sources [29.4 kB]
Get:60 http://archive.ubuntu.com wily-security/restricted Sources [2,854 B]
Get:61 http://archive.ubuntu.com wily-security/universe Sources [7,420 B]
Get:62 http://archive.ubuntu.com wily-security/multiverse Sources [2,772 B]
Get:63 http://archive.ubuntu.com wily-security/main amd64 Packages [93.1 kB]
Get:64 http://archive.ubuntu.com wily-security/restricted amd64 Packages [10.9 kB]
Get:65 http://archive.ubuntu.com wily-security/universe amd64 Packages [38.7 kB]
Get:66 http://archive.ubuntu.com wily-security/multiverse amd64 Packages [6,249 B]
Get:67 http://archive.ubuntu.com wily-security/main i386 Packages [91.0 kB]
Get:68 http://archive.ubuntu.com wily-security/restricted i386 Packages [10.8 kB]
Get:69 http://archive.ubuntu.com wily-security/universe i386 Packages [38.7 kB]
Get:70 http://archive.ubuntu.com wily-security/multiverse i386 Packages [6,434 B]
Get:71 http://archive.ubuntu.com wily-security/main Translation-en [48.4 kB]
Get:72 http://archive.ubuntu.com wily-security/multiverse Translation-en [2,806 B]
Get:73 http://archive.ubuntu.com wily-security/restricted Translation-en [2,666 B]
Get:74 http://archive.ubuntu.com wily-security/universe Translation-en [26.2 kB]
Get:75 http://archive.ubuntu.com wily-proposed/restricted amd64 Packages [28 B]
Get:76 http://archive.ubuntu.com wily-proposed/universe amd64 Packages [27.9 kB]
Get:77 http://archive.ubuntu.com wily-proposed/main amd64 Packages [37.4 kB]
Get:78 http://archive.ubuntu.com wily-proposed/multiverse amd64 Packages [28 B]
Get:79 http://archive.ubuntu.com wily-proposed/restricted i386 Packages [28 B]
Get:80 http://archive.ubuntu.com wily-proposed/universe i386 Packages [27.6 kB]
Get:81 http://archive.ubuntu.com wily-proposed/main i386 Packages [36.5 kB]
Get:82 http://archive.ubuntu.com wily-proposed/multiverse i386 Packages [737 B]
Get:83 http://archive.ubuntu.com wily-proposed/main Translation-en [18.9 kB]
Get:84 http://archive.ubuntu.com wily-proposed/multiverse Translation-en [1,236 B]
Get:85 http://archive.ubuntu.com wily-proposed/restricted Translation-en [28 B]
Get:86 http://archive.ubuntu.com wily-proposed/universe Translation-en [14.4 kB]
Fetched 32.3 MB in 7min 14s (74.4 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.
felin@theAnarchist:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade
Hit http://archive.ubuntu.com wily InRelease
Hit http://archive.ubuntu.com wily-updates InRelease
Hit http://archive.ubuntu.com wily-backports InRelease
Hit http://archive.ubuntu.com wily-security InRelease
Hit http://archive.ubuntu.com wily-proposed InRelease
Hit http://archive.ubuntu.com wily/main Sources
Hit http://archive.ubuntu.com wily/restricted Sources
Hit http://archive.ubuntu.com wily/universe Sources
Hit http://archive.ubuntu.com wily/multiverse Sources
Hit http://archive.ubuntu.com wily/main amd64 Packages
Hit http://archive.ubuntu.com wily/restricted amd64 Packages
Hit http://archive.ubuntu.com wily/universe amd64 Packages
Hit http://archive.ubuntu.com wily/multiverse amd64 Packages
Hit http://archive.ubuntu.com wily/main i386 Packages
Hit http://archive.ubuntu.com wily/restricted i386 Packages
Hit http://archive.ubuntu.com wily/universe i386 Packages
Hit http://archive.ubuntu.com wily/multiverse i386 Packages
Hit http://archive.canonical.com wily InRelease
Hit http://archive.ubuntu.com wily/main Translation-en
Hit http://archive.canonical.com wily/partner Sources
Hit http://archive.canonical.com wily/partner amd64 Packages
Hit http://archive.ubuntu.com wily/multiverse Translation-en
Hit http://archive.canonical.com wily/partner i386 Packages
Hit http://archive.canonical.com wily/partner Translation-en
Hit http://archive.ubuntu.com wily/restricted Translation-en
Hit http://archive.ubuntu.com wily/universe Translation-en
Hit http://archive.ubuntu.com wily-updates/main Sources
Hit http://archive.ubuntu.com wily-updates/restricted Sources
Hit http://archive.ubuntu.com wily-updates/universe Sources
Hit http://archive.ubuntu.com wily-updates/multiverse Sources
Hit http://archive.ubuntu.com wily-updates/main amd64 Packages
Hit http://archive.ubuntu.com wily-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com wily-updates/universe amd64 Packages
Hit http://archive.ubuntu.com wily-updates/multiverse amd64 Packages
Hit http://archive.ubuntu.com wily-updates/main i386 Packages
Hit http://archive.ubuntu.com wily-updates/restricted i386 Packages
Hit http://archive.ubuntu.com wily-updates/universe i386 Packages
Hit http://archive.ubuntu.com wily-updates/multiverse i386 Packages
Hit http://archive.ubuntu.com wily-updates/main Translation-en
Hit http://archive.ubuntu.com wily-updates/multiverse Translation-en
Hit http://archive.ubuntu.com wily-updates/restricted Translation-en
Hit http://archive.ubuntu.com wily-updates/universe Translation-en
Hit http://archive.ubuntu.com wily-backports/main Sources
Hit http://archive.ubuntu.com wily-backports/restricted Sources
Hit http://archive.ubuntu.com wily-backports/universe Sources
Hit http://archive.ubuntu.com wily-backports/multiverse Sources
Hit http://archive.ubuntu.com wily-backports/main amd64 Packages
Hit http://archive.ubuntu.com wily-backports/restricted amd64 Packages
Hit http://archive.ubuntu.com wily-backports/universe amd64 Packages
Hit http://archive.ubuntu.com wily-backports/multiverse amd64 Packages
Hit http://archive.ubuntu.com wily-backports/main i386 Packages
Hit http://archive.ubuntu.com wily-backports/restricted i386 Packages
Hit http://archive.ubuntu.com wily-backports/universe i386 Packages
Hit http://archive.ubuntu.com wily-backports/multiverse i386 Packages
Hit http://archive.ubuntu.com wily-backports/main Translation-en
Hit http://archive.ubuntu.com wily-backports/multiverse Translation-en
Hit http://archive.ubuntu.com wily-backports/restricted Translation-en
Hit http://archive.ubuntu.com wily-backports/universe Translation-en
Hit http://archive.ubuntu.com wily-security/main Sources
Hit http://archive.ubuntu.com wily-security/restricted Sources
Hit http://archive.ubuntu.com wily-security/universe Sources
Hit http://archive.ubuntu.com wily-security/multiverse Sources
Hit http://archive.ubuntu.com wily-security/main amd64 Packages
Hit http://archive.ubuntu.com wily-security/restricted amd64 Packages
Hit http://archive.ubuntu.com wily-security/universe amd64 Packages
Hit http://archive.ubuntu.com wily-security/multiverse amd64 Packages
Hit http://archive.ubuntu.com wily-security/main i386 Packages
Hit http://archive.ubuntu.com wily-security/restricted i386 Packages
Hit http://archive.ubuntu.com wily-security/universe i386 Packages
Hit http://archive.ubuntu.com wily-security/multiverse i386 Packages
Hit http://archive.ubuntu.com wily-security/main Translation-en
Hit http://archive.ubuntu.com wily-security/multiverse Translation-en
Hit http://archive.ubuntu.com wily-security/restricted Translation-en
Hit http://archive.ubuntu.com wily-security/universe Translation-en
Hit http://archive.ubuntu.com wily-proposed/restricted amd64 Packages
Hit http://archive.ubuntu.com wily-proposed/universe amd64 Packages
Hit http://archive.ubuntu.com wily-proposed/main amd64 Packages
Hit http://archive.ubuntu.com wily-proposed/multiverse amd64 Packages
Hit http://archive.ubuntu.com wily-proposed/restricted i386 Packages
Hit http://archive.ubuntu.com wily-proposed/universe i386 Packages
Hit http://archive.ubuntu.com wily-proposed/main i386 Packages
Hit http://archive.ubuntu.com wily-proposed/multiverse i386 Packages
Hit http://archive.ubuntu.com wily-proposed/main Translation-en
Hit http://archive.ubuntu.com wily-proposed/multiverse Translation-en
Hit http://archive.ubuntu.com wily-proposed/restricted Translation-en
Hit http://archive.ubuntu.com wily-proposed/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.
felin@theAnarchist:~$ find /etc/apt -name '*.list' -exec ash -c 'echo -e "\n$1|n";cat -n "$1"'_'{}' \;
find: `ash': No such file or directory
felin@theAnarchist:~$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1|n";cat -n "$1"'_'{}' \;

|n
cat: _/etc/apt/sources.list: No such file or directory
felin@theAnarchist:~$ 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:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Felin (otienofelin) said :
#1

I've copy/pasted the terminal output

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

what is the output of:

file /var/lib/dpkg/status

Thanks

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#3

You mistyped one of the commands. You should use copy and paste, instead of trying to re-type these commands.

Execute

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

and re-try

sudo apt-get update
sudo apt-get upgrade

and copy/paste all output.

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#4

@Felin: please reread ALL the instructions in step 6 of the procedure. It clearly asks you to use copy-paste to avoid typing mistakes:

"Please copy-paste the following commands one line at a time from the https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure website using Chromium or Firefox into the Linux Terminal.

Tip: If you have a wheel mouse or 3 button mouse you do not need to type commands into the Terminal. Highlight each command on the page using the mouse. Move your cursor anywhere in the Terminal and press the wheel or middle button. Automatic Copy and paste! No spelling mistakes! No Typos! No other errors!"

Revision history for this message
Felin (otienofelin) said :
#5

Thanks Manfred Hampl, that solved my question.

Revision history for this message
Felin (otienofelin) said :
#6

Thanks guys...I actually overlooked the copy/paste bit but I'll be sure to try out and give my feedback