Обновление Apt: Проблема с отключением файла ... (30: Файловая система только для чтения)

Пробовал решения, предоставленные несколькими другими вопросами по AskUbuntu, но ни одно из них не работает так, как описано ниже.

В Ubuntu 16.04.1 LTS, когда я запускаю

sudo apt update

, мы получаем следующую ошибку.

Ign:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Err:3 http://security.ubuntu.com/ubuntu xenial-security Release
  Could not open file /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial-security_Release - open (30: Read-only file system) [IP: 2001:67c:1560:8001::11 80]
Hit:2 http://nyc2.mirrors.digitalocean.com/ubuntu xenial InRelease
Err:2 http://nyc2.mirrors.digitalocean.com/ubuntu xenial InReleasetempfiles for splitting up /var/lib/apt/lists/mirrors.digitalocean.com_ubuntu_dists_xenial_InRelease
  Could not execute 'apt-key' to verify signature (is gnupg installed?)
Ign:4 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates InRelease
Ign:5 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports InRelease
Err:6 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates Release
  Could not open file /var/lib/apt/lists/partial/mirrors.digitalocean.com_ubuntu_dists_xenial-updates_Release - open (30: Read-only file system) [IP: 2604:a880:0:1::4 80]
Err:7 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports Release
  Could not open file /var/lib/apt/lists/partial/mirrors.digitalocean.com_ubuntu_dists_xenial-backports_Release - open (30: Read-only file system) [IP: 192.241.164.26 80]
Reading package lists... Done
W: chown to _apt:root of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (30: Read-only file system)
W: Not using locking for read only lock file /var/lib/apt/lists/lock
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.IRU0Ss - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.xj8X0s - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.3xfW8s - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.DxtUgt - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial-security_InRelease - PrepareFiles (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial-security_Release - PrepareFiles (30: Read-only file system)
E: The repository 'http://security.ubuntu.com/ubuntu xenial-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Problem unlinking the file /var/lib/apt/lists/partial/mirrors.digitalocean.com_ubuntu_dists_xenial_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/mirrors.digitalocean.com_ubuntu_dists_xenial_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/mirrors.digitalocean.com_ubuntu_dists_xenial_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chown to root:root of file /var/lib/apt/lists/mirrors.digitalocean.com_ubuntu_dists_xenial_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/mirrors.digitalocean.com_ubuntu_dists_xenial_InRelease failed - 400::URIFailure (30: Read-only file system)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://nyc2.mirrors.digitalocean.com/ubuntu xenial InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)
W: Problem unlinking the file /var/lib/apt/lists/partial/mirrors.digitalocean.com_ubuntu_dists_xenial-updates_InRelease - PrepareFiles (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/mirrors.digitalocean.com_ubuntu_dists_xenial-backports_InRelease - PrepareFiles (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/mirrors.digitalocean.com_ubuntu_dists_xenial-updates_Release - PrepareFiles (30: Read-only file system)
E: The repository 'http://mirrors.digitalocean.com/ubuntu xenial-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Problem unlinking the file /var/lib/apt/lists/partial/mirrors.digitalocean.com_ubuntu_dists_xenial-backports_Release - PrepareFiles (30: Read-only file system)
E: The repository 'http://mirrors.digitalocean.com/ubuntu xenial-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (30: Read-only file system)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (30: Read-only file system)
W: Not using locking for read only lock file /var/lib/dpkg/lock

Попытка 1

~# mount -o remount,rw /
~# reboot

Результат: Такая же ошибка обнаружена после перезагрузки.

Попытка 2

~# sudo fsck -Af
fsck from util-linux 2.27.1
~#reboot

Результат: Такая же ошибка обнаружена после перезагрузки.

Подробнее

~# dmesg | grep "EXT4-fs error"
~# mount -t ext4
/dev/vda1 on / type ext4 (ro,relatime,data=ordered)

Что происходит? Есть идеи?

1
задан 29 May 2018 в 06:22

1 ответ

У меня была такая же проблема на Ubuntu 18.04.4.

Затем я увидел, что ничего не могу запустить, когда терминал в домашнем каталоге, потому что файловая система каталога home была только для чтения . Я думал, что перезагрузка решит проблему, но мой компьютер завис в разделе (initramfs) _ во время перезагрузки. Мой домашний каталог смонтирован как / dev / sda2 ( sudo fdisk -l , чтобы увидеть это).

Согласно этот ответ я набрал:

(initramfs) fsck /dev/sda2

затем:

(initramfs) reboot

Это решило мою проблему, и я могу запустить apt update и другие вещи.

примечание: это временное решение. Я дам вам знать, если найду постоянное решение.

править: Я нашел решение. Проблема возникает, если на вашем диске много сбойных секторов . Вы должны игнорировать эти поврежденные сектора на диске.

3
ответ дан 29 February 2020 в 19:28

Другие вопросы по тегам:

Похожие вопросы: