Debian 10 buster apt 更新失败 - 只读文件系统

Debian 10 buster apt 更新失败 - 只读文件系统

我的 Debian 10 Buster 服务器上启用了自动更新。然而我注意到运行时出现了很多错误易于更新手动命令:

Err:2 http://security.debian.org/debian-security buster/updates Release
  Could not open file /var/lib/apt/lists/partial/security.debian.org_debian-security_dists_buster_updates_Release - open (30: Read-only file system) [IP:]
Hit:3 http://ftp.de.debian.org/debian stable InRelease
Err:3 http://ftp.de.debian.org/debian stable InRelease
  Couldn't create temporary file /tmp/apt.conf.eYF3oi for passing config to apt-key
Hit:4 https://deb.nodesource.com/node_12.x buster InRelease
Err:4 https://deb.nodesource.com/node_12.x buster InRelease
  Couldn't create temporary file /tmp/apt.conf.CraMte for passing config to apt-key
Hit:5 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
Err:5 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
  Couldn't create temporary file /tmp/apt.conf.PnxFvd for passing config to apt-key
Hit:6 https://packages.sury.org/php buster InRelease
Err:6 https://packages.sury.org/php buster InRelease
  Couldn't create temporary file /tmp/apt.conf.YH5tQi for passing config to apt-key
Hit:7 http://repo.mysql.com/apt/debian buster InRelease
Err:7 http://repo.mysql.com/apt/debian buster InRelease
  Couldn't create temporary file /tmp/apt.conf.nny8ap for passing config to apt-key
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: chown to _apt:root of directory /var/lib/apt/lists/auxfiles failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chmod 0700 of directory /var/lib/apt/lists/auxfiles 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.AK6iXs - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.IWp7Gu - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.aIUVqw - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.qFwKay - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.a5kzUz - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.EGgoEB - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/security.debian.org_debian-security_dists_buster_updates_InRelease - PrepareFiles (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/security.debian.org_debian-security_dists_buster_updates_Release - PrepareFiles (30: Read-only file system)
E: The repository 'http://security.debian.org/debian-security buster/updates Release' no longer has 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/ftp.de.debian.org_debian_dists_stable_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/ftp.de.debian.org_debian_dists_stable_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/ftp.de.debian.org_debian_dists_stable_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chown to root:root of file /var/lib/apt/lists/ftp.de.debian.org_debian_dists_stable_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/ftp.de.debian.org_debian_dists_stable_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://ftp.de.debian.org/debian stable InRelease: Couldn't create temporary file /tmp/apt.conf.eYF3oi for passing config to apt-key
W: Problem unlinking the file /var/lib/apt/lists/partial/deb.nodesource.com_node%5f12.x_dists_buster_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/deb.nodesource.com_node%5f12.x_dists_buster_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/deb.nodesource.com_node%5f12.x_dists_buster_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chown to root:root of file /var/lib/apt/lists/deb.nodesource.com_node%5f12.x_dists_buster_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/deb.nodesource.com_node%5f12.x_dists_buster_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: https://deb.nodesource.com/node_12.x buster InRelease: Couldn't create temporary file /tmp/apt.conf.CraMte for passing config to apt-key
W: Problem unlinking the file /var/lib/apt/lists/partial/artifacts.elastic.co_packages_7.x_apt_dists_stable_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/artifacts.elastic.co_packages_7.x_apt_dists_stable_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/artifacts.elastic.co_packages_7.x_apt_dists_stable_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chown to root:root of file /var/lib/apt/lists/artifacts.elastic.co_packages_7.x_apt_dists_stable_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/artifacts.elastic.co_packages_7.x_apt_dists_stable_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: https://artifacts.elastic.co/packages/7.x/apt stable InRelease: Couldn't create temporary file /tmp/apt.conf.PnxFvd for passing config to apt-key
W: Problem unlinking the file /var/lib/apt/lists/partial/packages.sury.org_php_dists_buster_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/packages.sury.org_php_dists_buster_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/packages.sury.org_php_dists_buster_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chown to root:root of file /var/lib/apt/lists/packages.sury.org_php_dists_buster_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/packages.sury.org_php_dists_buster_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: https://packages.sury.org/php buster InRelease: Couldn't create temporary file /tmp/apt.conf.YH5tQi for passing config to apt-key
W: Problem unlinking the file /var/lib/apt/lists/partial/repo.mysql.com_apt_debian_dists_buster_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/repo.mysql.com_apt_debian_dists_buster_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/repo.mysql.com_apt_debian_dists_buster_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chown to root:root of file /var/lib/apt/lists/repo.mysql.com_apt_debian_dists_buster_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/repo.mysql.com_apt_debian_dists_buster_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://repo.mysql.com/apt/debian buster InRelease: Couldn't create temporary file /tmp/apt.conf.nny8ap for passing config to apt-key
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)

我认为该错误是由于服务器未正确关闭而引起的。

你能帮我解决这个问题吗?谢谢!

答案1

我认为该错误是由于服务器未正确关闭而引起的。

这实际上是主要问题我在这里读到

我的其他 Ubuntu 实例也受到同样问题的影响。我重新启动服务器以解决问题!

答案2

可以将文件系统重新挂载为读/写,但不要这样做。我建议在文件系统上运行 fsck,这将需要重新启动,因为它必须具有写入权限才能修复任何错误。

如何在重新启动时强制执行 fsck:

sudo shutdown -rF now

或(如果您可以写信给/)

sudo touch /forcefsck
sudo reboot now

相关内容