更新时出现多个错误

更新时出现多个错误

突然之间,在我没有进行任何干预的情况下,我的服务器突然停止处理电子邮件。

使用 Ubuntu 22.04。

当我尝试更新时出现以下错误:

user@mail:~$ sudo apt-get update
Hit:1 http://nova.clouds.archive.ubuntu.com/ubuntu jammy InRelease
Err:1 http://nova.clouds.archive.ubuntu.com/ubuntu jammy InRelease
  Couldn't create temporary file /tmp/apt.conf.IKXbKx for passing config to apt-key
Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Err:3 http://security.ubuntu.com/ubuntu jammy-security Release
  Could not open file /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_jammy-security_Release - open (30: Read-only file system) [IP: 185.125.190.36 80]
Ign:4 http://nova.clouds.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:5 http://nova.clouds.archive.ubuntu.com/ubuntu jammy-backports InRelease
Err:5 http://nova.clouds.archive.ubuntu.com/ubuntu jammy-backports InRelease
  Couldn't create temporary file /tmp/apt.conf.3t2NAg for passing config to apt-key
Err:6 http://nova.clouds.archive.ubuntu.com/ubuntu jammy-updates Release
  Could not open file /var/lib/apt/lists/partial/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy-updates_Release - open (30: Read-only file system) [IP: 185.125.190.41 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: chown to _apt:root of directory /var/lib/apt/lists/auxfiles failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chmod 0755 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.o6rjJv - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.tW8m77 - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.zqqC2m - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.ODvfCF - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chown to root:root of file /var/lib/apt/lists/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy_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://nova.clouds.archive.ubuntu.com/ubuntu jammy InRelease: Couldn't create temporary file /tmp/apt.conf.IKXbKx for passing config to apt-key
W: Problem unlinking the file /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_jammy-security_InRelease - PrepareFiles (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_jammy-security_Release - PrepareFiles (30: Read-only file system)
E: The repository 'http://security.ubuntu.com/ubuntu jammy-security 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/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy-updates_InRelease - PrepareFiles (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy-backports_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy-backports_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy-backports_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chown to root:root of file /var/lib/apt/lists/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy-backports_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy-backports_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://nova.clouds.archive.ubuntu.com/ubuntu jammy-backports InRelease: Couldn't create temporary file /tmp/apt.conf.3t2NAg for passing config to apt-key
W: Problem unlinking the file /var/lib/apt/lists/partial/nova.clouds.archive.ubuntu.com_ubuntu_dists_jammy-updates_Release - PrepareFiles (30: Read-only file system)
E: The repository 'http://nova.clouds.archive.ubuntu.com/ubuntu jammy-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/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)
user@mail:~$

我也尝试升级并得到以下结果:

user@mail:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-headers-generic linux-headers-virtual linux-image-virtual linux-virtual python3-update-manager update-manager-core
The following packages will be upgraded:
  clamav clamav-base clamav-daemon clamav-freshclam clamdscan libclamav9 libclamunrar9 qemu-guest-agent
8 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 1780 kB of archives.
After this operation, 78.8 kB disk space will be freed.
W: Not using locking for read only lock file /var/lib/dpkg/lock-frontend
W: Not using locking for read only lock file /var/lib/dpkg/lock
W: chown to _apt:root of directory /var/cache/apt/archives/partial failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chmod 0700 of directory /var/cache/apt/archives/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 0755 of directory /var/lib/apt/lists/auxfiles failed - SetupAPTPartialDirectory (30: Read-only file system)
W: Not using locking for read only lock file /var/cache/apt/archives/lock
Do you want to continue? [Y/n]

非常感谢您的帮助。我真的不想从头开始重新安装所有内容,因为它是一个邮件服务器,需要几天才能完成。

此外,这是快照版本,因此无法恢复并获得比此安装更好的任何内容。

非常感谢。

添加: 我运行了此命令并重新启动,似乎已修复。但这让我很害怕。我不太明白发生了什么,可能类似于 windows dik 错误。但在邮件服务器上时,这更令人担忧。欢迎提供任何进一步的建议。以下是解决问题的方法:

user@mail:~$ sudo fsck
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
cloudimg-rootfs: recovering journal
cloudimg-rootfs contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found.  Fix<y>? yes
Inode 528 was part of the orphaned inode list.  FIXED.
Deleted inode 2083 has zero dtime.  Fix<y>? yes
Inode 2103 was part of the orphaned inode list.  FIXED.
Inode 2200 was part of the orphaned inode list.  FIXED.
Inode 2208 was part of the orphaned inode list.  FIXED.
Inode 3070, i_blocks is 3752, should be 3760.  Fix<y>? yes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  +7831908
Fix<y>? yes
Free blocks count wrong for group #239 (14887, counted=14886).
Fix<y>? yes
Free blocks count wrong for group #430 (23597, counted=23596).
Fix<y>? yes
Free blocks count wrong (18247366, counted=18281663).
Fix<y>? yes
Inode bitmap differences:  -528 -2083 -2103 -2200 -2208
Fix<y>? yes
Free inodes count wrong for group #0 (395, counted=400).
Fix<y>? yes
Free inodes count wrong (10185489, counted=10185110).
Fix ('a' enables 'yes' to all) <y>? yes

cloudimg-rootfs: ***** FILE SYSTEM WAS MODIFIED *****
cloudimg-rootfs: ***** REBOOT SYSTEM *****
cloudimg-rootfs: 136810/10321920 files (0.6% non-contiguous), 2661436/20943099 blocks

相关内容