今天我尝试在我们的 Ubuntu 22.04 服务器上运行 sudo apt-get update 并得到以下结果:
Hit:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Err:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Couldn't create temporary file /tmp/apt.conf.Z3BHzc for passing config to apt-key
Ign:2 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 https://download.docker.com/linux/ubuntu jammy InRelease
Err:3 https://download.docker.com/linux/ubuntu jammy InRelease
Couldn't create temporary file /tmp/apt.conf.LzHmDB for passing config to apt-key
Hit:4 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
Err:4 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
Couldn't create temporary file /tmp/apt.conf.BI6ryE for passing config to apt-key
Ign:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
Err:6 http://us.archive.ubuntu.com/ubuntu jammy-updates Release
Could not open file /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_jammy-updates_Release - open (30: Read-only file system) [IP: 91.189.91.38 80]
Ign:7 https://packages.adoptium.net/artifactory/deb jammy InRelease
Err:8 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]
Err:10 https://packages.adoptium.net/artifactory/deb jammy Release
Could not open file /var/lib/apt/lists/partial/packages.adoptium.net_artifactory_deb_dists_jammy_Release - open (30: Read-only file system) [IP: 146.75.31.42 443]
Ign:9 https://dl.secondarymetabolites.org/repos/deb stretch InRelease
Err:11 https://dl.secondarymetabolites.org/repos/deb stretch Release
Could not open file /var/lib/apt/lists/partial/dl.secondarymetabolites.org_repos_deb_dists_stretch_Release - open (30: Read-only file system) [IP: 130.226.55.166 443]
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.TJV3M3 - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.M93znf - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.1e8ngs - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.G9BiRJ - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.a4ZV2H - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.4b3Qrx - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.PeblqD - IsAccessibleBySandboxUser (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/partial/dl.secondarymetabolites.org_repos_deb_dists_stretch_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/partial/dl.secondarymetabolites.org_repos_deb_dists_stretch_InRelease failed - Item::QueueURI (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_jammy_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_jammy_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/us.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/us.archive.ubuntu.com_ubuntu_dists_jammy_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/us.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://us.archive.ubuntu.com/ubuntu jammy InRelease: Couldn't create temporary file /tmp/apt.conf.Z3BHzc for passing config to apt-key
W: Problem unlinking the file /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_jammy-updates_InRelease - PrepareFiles (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/download.docker.com_linux_ubuntu_dists_jammy_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/download.docker.com_linux_ubuntu_dists_jammy_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/download.docker.com_linux_ubuntu_dists_jammy_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chown to root:root of file /var/lib/apt/lists/download.docker.com_linux_ubuntu_dists_jammy_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/download.docker.com_linux_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: https://download.docker.com/linux/ubuntu jammy InRelease: Couldn't create temporary file /tmp/apt.conf.LzHmDB for passing config to apt-key
W: Problem unlinking the file /var/lib/apt/lists/partial/us.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/us.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/us.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/us.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/us.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://us.archive.ubuntu.com/ubuntu jammy-backports InRelease: Couldn't create temporary file /tmp/apt.conf.BI6ryE 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/us.archive.ubuntu.com_ubuntu_dists_jammy-updates_Release - PrepareFiles (30: Read-only file system)
E: The repository 'http://us.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/lib/apt/lists/partial/packages.adoptium.net_artifactory_deb_dists_jammy_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: chown to _apt:root of file /var/lib/apt/lists/partial/dl.secondarymetabolites.org_repos_deb_dists_stretch_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/partial/dl.secondarymetabolites.org_repos_deb_dists_stretch_InRelease failed - Item::QueueURI (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/packages.adoptium.net_artifactory_deb_dists_jammy_Release - PrepareFiles (30: Read-only file system)
E: The repository 'https://packages.adoptium.net/artifactory/deb jammy 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: chown to root:root of file /var/lib/apt/lists/partial/dl.secondarymetabolites.org_repos_deb_dists_stretch_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/partial/dl.secondarymetabolites.org_repos_deb_dists_stretch_InRelease failed - 400::URIFailure (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/dl.secondarymetabolites.org_repos_deb_dists_stretch_Release - PrepareFiles (30: Read-only file system)
E: The repository 'http://dl.secondarymetabolites.org/repos/deb stretch 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)
为了解决这个问题,/tmp 权限设置正确,而且我肯定没有在 /tmp 中安装任何东西(通过多种方式检查)。上周我对系统做的最后一件事是将 NFS 存储卷安装到我在 / 中创建的新文件夹 /mnt。我不确定这是否与此有关。但是,上周每当我使用 apt 运行任何程序时,我都会收到有关“dl.secondarymetabolites.org_repos_deb_dists_stretch_Release”的奇怪错误消息,这似乎更可能是问题的一部分。
问题似乎集中在 /var/lib/apt/lists/partial 上。我尝试删除部分(或我在其中看到的一个项目,即“dl.secondarymetabolites.org_repos_deb_dists_stretch_Release”)并重新创建目录,但我显然没有权限对该目录执行任何操作,包括删除它。
运行 ls -lah /var/lib/apt/lists/partial 显示以下内容:
drwx------ 2 _apt root 20K Nov 12 20:29 .
drwxr-xr-x 4 root root 20K Nov 12 20:29 ..
-rw-r--r-- 1 root root 5.2K Apr 20 2019 dl.secondarymetabolites.org_repos_deb_dists_stretch_InRelease
当我尝试删除文件“dl.secondarymetabolites.org_repos_deb_dists_stretch_InRelease”或目录“options”或者移动文件或任何内容时,我收到此信息:
rm: cannot remove 'partial/dl.secondarymetabolites.org_repos_deb_dists_stretch_InRelease': Read-only file system
关于如何让 apt 再次工作,您有什么见解吗?(所有 apt 命令都会出现奇怪的错误)