Can't update Ubuntu. " Not using locking for read only lock file /var/lib/dpkg/lock"
Pasting what I could from Terminal from guide posted on https:/
At some points where the output was long, Terminal seemed to auto-clear the text above a certain point, and so not all the text could be copied. I noted where that happened in the log. To retrieve as much of the information as I could, I copied and pasted after running each command.
I'm not sure if it's relevant but System Monitor and the Software Center don't open anymore. Running the updater doesn't do much, as every button I press seems to just refresh the list. I can't access settings because it just refreshes the list; I can update packages because all it does is refresh the list. (I can select/deselect packages just fine, but I can't do anything with them even if I do).
Honestly, all I want to do is update Chrome if this old laptop of mine can handle it. Everything else doesn't matter.
!! Would it just be easier to get all my important files off and install a fresher version of Ubuntu and start with a clean slate than to repair this version?
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
sidka@Sidka:~$ ubuntu-
Support status summary of 'Sidka':
You have 147 packages (6.5%) supported until October 2013 (18m)
You have 24 packages (1.1%) supported until June 2015 (18m)
You have 1812 packages (80.4%) supported until April 2017 (5y)
You have 14 packages (0.6%) that can not/no longer be downloaded
You have 258 packages (11.4%) that are unsupported
Run with --show-unsupported, --show-supported or --show-all to see more details
sidka@Sidka:~$
sidka@Sidka:~$ sudo grep -R proxy /etc/apt/*
[sudo] password for sidka:
sudo: unable to open /var/lib/
sidka@Sidka:~$ sidka@Sidka:~$ grep proxy /etc/environment
sidka@Sidka:~$ echo $http_proxy
sidka@Sidka:~$ echo $ftp_proxy
sidka@Sidka:~$ grep proxy /etc/bash.bashrc
sidka@Sidka:~$ grep proxy ~/.bashrc
sidka@Sidka:~$
sidka@Sidka:~$
sidka@Sidka:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
sidka@Sidka:~$ sudo fuser -vvv /var/lib/dpkg/lock
[sudo] password for sidka:
sudo: unable to open /var/lib/
sidka@Sidka:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
sidka@Sidka:~$ uname -a
Linux Sidka 3.2.0-41-generic #66-Ubuntu SMP Thu Apr 25 03:28:09 UTC 2013 i686 athlon i386 GNU/Linux
sidka@Sidka:~$ sudo rm /var/lib/
[sudo] password for sidka:
Sorry, try again.
[sudo] password for sidka:
sudo: unable to open /var/lib/
rm: cannot remove `/var/lib/
sidka@Sidka:~$ sudo rm /var/lib/dpkg/lock
[sudo] password for sidka:
sudo: unable to open /var/lib/
rm: cannot remove `/var/lib/
sidka@Sidka:~$ sudo cp -arf /var/lib/dpkg /var/lib/
[sudo] password for sidka:
sudo: unable to open /var/lib/
cp: cannot create directory `/var/lib/
sidka@Sidka:~$ sudo mv /var/lib/
[sudo] password for sidka:
sudo: unable to open /var/lib/
mv: cannot move `/var/lib/
sidka@Sidka:~$ sudo cp /var/lib/
[sudo] password for sidka:
sudo: unable to open /var/lib/
cp: cannot create regular file `/var/lib/
sidka@Sidka:~$ sudo cp /var/lib/
[sudo] password for sidka:
sudo: unable to open /var/lib/
cp: cannot create regular file `/var/lib/
[sudo] password for sidka:
lSorry, try again.
[sudo] password for sidka:
Sorry, try again.
[sudo] password for sidka:
sudo: unable to open /var/lib/
cp: cannot create regular file `/var/lib/
sidka@Sidka:~$ sudo cp /var/lib/
[sudo] password for sidka:
sudo: unable to open /var/lib/
cp: cannot create regular file `/var/lib/
sidka@Sidka:~$ sudo rm -rf /var/lib/
[sudo] password for sidka:
sudo: unable to open /var/lib/
[[It cuts out the top bit. I don't know why, but here's what I can get when I run sudo rm -rf /var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
rm: cannot remove `/var/lib/
sidka@Sidka:~$ sudo rm /var/cache/
[sudo] password for sidka:
sudo: unable to open /var/lib/
rm: cannot remove `/var/cache/
rm: cannot remove `/var/cache/
sidka@Sidka:~$ sudo mkdir /var/lib/apt/lists
[sudo] password for sidka:
sudo: unable to open /var/lib/
mkdir: cannot create directory `/var/lib/
sidka@Sidka:~$ sudo mkdir /var/lib/
[sudo] password for sidka:
sudo: unable to open /var/lib/
mkdir: cannot create directory `/var/lib/
sidka@Sidka:~$ LANG=C;sudo apt-get clean
[sudo] password for sidka:
Sorry, try again.
[sudo] password for sidka:
sudo: unable to open /var/lib/
W: Not using locking for read only lock file /var/cache/
sidka@Sidka:~$ LANG=C;sudo apt-get autoclean
[sudo] password for sidka:
sudo: unable to open /var/lib/
W: Not using locking for read only lock file /var/cache/
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.
sidka@Sidka:~$ LANG=C;sudo apt-get --purge autoremove
[sudo] password for sidka:
sudo: unable to open /var/lib/
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.
[[Another cut out for LANG=C;sudo apt-get --fix-missing update -o APT::Cache-
tiverse/
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
E: Some index files failed to download. They have been ignored, or old ones used instead.
W: Not using locking for read only lock file /var/lib/dpkg/lock
sidka@Sidka:~$ sudo dpkg --configure -a
[sudo] password for sidka:
sudo: unable to open /var/lib/
dpkg: error: unable to access dpkg status area: Read-only file system
sidka@Sidka:~$ sudo dpkg --clear-avail
[sudo] password for sidka:
sudo: unable to open /var/lib/
dpkg: error: unable to access dpkg status area for bulk available update: Read-only file system
sidka@Sidka:~$ LANG=C;sudo apt-get -f install
[sudo] password for sidka:
sudo: unable to open /var/lib/
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.
sidka@Sidka:~$ LANG=C;sudo apt-get --fix-missing install
[sudo] password for sidka:
sudo: unable to open /var/lib/
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.
[[Yet another cut out LANG=C;sudo apt-get update -o APT::Cache-
ary-i386/Packages 404 Not Found [IP: 91.189.92.191 80]
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
E: Some index files failed to download. They have been ignored, or old ones used instead.
W: Not using locking for read only lock file /var/lib/dpkg/lock
[[Last one for find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;]]
sabled on upgrade to oneiric
/etc/apt/
1 # deb http://
2 # deb-src http://
/etc/apt/
1 ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
2 # You may comment out this entry, but any other modifications may be lost.
3 deb http://
/etc/apt/
1 ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
2 # You may comment out this entry, but any other modifications may be lost.
3 deb http://
/etc/apt/
1 # deb http://
2 # deb-src http://
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu apt Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Sid for more information if necessary.