我尝试使用 sudo apt-get update 进行更新,但出现以下错误:
elease rename failed, Read-only file system (/var/lib/apt/lists/ppa.launchpad.net_octave_stable_ubuntu_dists_precise_Release -> /var/lib/apt/lists/ppa.launchpad.net_octave_stable_ubuntu_dists_precise_Release).
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release rename failed, Read-only file system (/var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_precise_Release -> /var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_precise_Release).
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/Release rename failed, Read-only file system (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_Release -> /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_Release).
W: Failed to fetch http://ppa.launchpad.net/transmissionbt/ppa/ubuntu/dists/precise/Release rename failed, Read-only file system (/var/lib/apt/lists/ppa.launchpad.net_transmissionbt_ppa_ubuntu_dists_precise_Release -> /var/lib/apt/lists/ppa.launchpad.net_transmissionbt_ppa_ubuntu_dists_precise_Release).
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release rename failed, Read-only file system (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_Release -> /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_Release).
W: 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
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.
有什么问题?
答案1
打开终端并输入以下命令:
sudo -i
apt-get clean
cd /var/lib/apt
mv lists lists.old
mkdir -p lists/partial
apt-get clean
apt-get update
这会将您的“list”文件夹重命名为“list.old”以便备份,然后重建。