无法将 ubuntu 从 21.10 更新至 22.04 版本

无法将 ubuntu 从 21.10 更新至 22.04 版本

我正在尝试将我的 ubantu 版本从 21.10 更新到 22.04,为此我必须安装当前可用的更新。当我运行时sudo apt updatesudo apt-get update我收到以下不确定的错误:

Get:1 http://in.archive.ubuntu.com/ubuntu jammy InRelease                      
Get:2 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease              
Get:3 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease            
Ign:1 http://in.archive.ubuntu.com/ubuntu jammy InRelease                      
Ign:2 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease              
Ign:3 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease            
Hit:4 https://deb.nodesource.com/node_16.x focal InRelease                     
Hit:5 http://archive.ubuntu.com/ubuntu jammy InRelease                         
Hit:6 http://archive.ubuntu.com/ubuntu jammy-updates InRelease                 
Get:7 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:7 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:7 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:7 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:1 http://in.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:3 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease
Err:1 http://in.archive.ubuntu.com/ubuntu jammy InRelease
  Undetermined Error [IP: 192.168.1.1 80]
Err:2 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease
  Undetermined Error [IP: 192.168.1.1 80]
Err:3 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease
  Undetermined Error [IP: 192.168.1.1 80]
Get:7 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:7 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:7 http://security.ubuntu.com/ubuntu jammy-security InRelease
Err:7 http://security.ubuntu.com/ubuntu jammy-security InRelease
  Undetermined Error [IP: 192.168.1.1 80]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1940 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/jammy/InRelease  Undetermined Error [IP: 192.168.1.1 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease  Undetermined Error [IP: 192.168.1.1 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease  Undetermined Error [IP: 192.168.1.1 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease  Undetermined Error [IP: 192.168.1.1 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

当我尝试运行sudo apt upgradesudo apt-get upgrade

1890 upgraded, 76 newly installed, 0 to remove and 50 not upgraded.
207 standard security updates
Need to get 1,311 MB/2,009 MB of archives.
After this operation, 946 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

它显示了如下窗口: 部分可更新窗口

一些软件包已安装,一些软件包显示以下错误:

Err:1741 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 libsixel1 amd64 1.10.3-3
  File has unexpected size (1356 != 780). Mirror sync in progress? [IP: 192.168.1.1 80]
  Hashes of expected file:
   - SHA512:c476182c99f6f88fc1d648a12ec41741864ee8018368deeecb28aa949ba32d56b1af9236ad695c991b10f43df738424088fb2d45d6cc7924c1d673e0105196d9
   - SHA256:ef28327242ed49e1c77a070ced23fad258937b496f648211bd8a61e23ef08f5c
   - SHA1:1e40ce93b62e7e38baf248f0e315045e3364e3e2 [weak]
   - MD5Sum:0853cf59c24bb86a317ef80d33a2f515 [weak]
   - Filesize:110654 [weak]
Err:1742 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 libsixel-bin amd64 1.10.3-3
  File has unexpected size (1356 != 780). Mirror sync in progress? [IP: 192.168.1.1 80]
  Hashes of expected file:
   - SHA512:db20423452f3779be43e359221151b5e4b79e5102ff7810a1dd76e7e31f7a541c9a7586de737c08257cf610287092762c94bf0fe2d67e64b223e851975f847fa
   - SHA256:fe9a51b2b9b5fb1d3a0eb6a245c6c7500a372e4ea9bd25cfa83c2749d7e593a3
   - SHA1:f5e5d76188a27c029530542023b58c0bae3a0e8f [weak]
   - MD5Sum:570270397cde85373e8208f9c44cab42 [weak]
   - Filesize:18484 [weak]
Err:1743 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 mesa-utils amd64 8.4.0-1ubuntu1
  File has unexpected size (1356 != 780). Mirror sync in progress? [IP: 192.168.1.1 80]
  Hashes of expected file:
   - SHA512:35b3b58820f667f486084c9aa8936d1ae12785b004faa134c8ff9942dcd26e4b93623f946e2db85c7a877ed26e88c11d31569b040011a8ad09fbcc1efae475f5
   - SHA256:594182eec59fe136428e174b06cf3f98d55f83d342eee37504c5478ddf828dc2
   - SHA1:0c25b537e0c73a07b9dbbdcfbdb290784a4de510 [weak]
   - MD5Sum:c3c5c67df470198ebf06fc37edfcc9f3 [weak]
   - Filesize:1064536 [weak]
Ign:1744 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 mobile-broadband-provider-info all 20220315-1
Ign:1745 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 mutter-common all 42.2-0ubuntu1
Err:1746 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 pocketsphinx-en-us all 0.8.0+real5prealpha+1-14ubuntu1
  File has unexpected size (1356 != 780). Mirror sync in progress? [IP: 192.168.1.1 80]
  Hashes of expected file:
   - SHA512:c24404acdc1d3b7784e04f308a31ace5a3d4b0fb955083dad21006275e477f038d0e28fc2b50db321a1479a98adbb7aed479c8dcc3bce279a3c91d28a92d8aa6
   - SHA256:4fa57d7cd71fd8dd3a00f0de03f32071f84de75f78d093bd67b7cfc71350731d
   - SHA1:ffd0a022680a43466e18313725ad82166e8fffd6 [weak]
   - MD5Sum:19a460a3c201d21b1bbe30de39470fa5 [weak]
   - Filesize:27642780 [weak]
Err:1747 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 r-base-html all 4.1.2-1ubuntu2
  File has unexpected size (1356 != 780). Mirror sync in progress? [IP: 192.168.1.1 80]
  Hashes of expected file:
   - SHA512:ebf994e5477cadfbfa1bee9ca711a379f7d2bf04698ebdf7cd3d140832416953f447da5a4a5858a46942324338ccf0b383feeb39ff3479953e8190b3ff242358
   - SHA256:e2a0c3a60a7c40458fb9c94842b26fc67bf3bd818a15f9aab1a0a60dcd2b63b8
   - SHA1:37245e495936ba805007649e7179fec0986461b3 [weak]
   - MD5Sum:7ba9f6c91cdba2abf1e496a2cc437b92 [weak]
   - Filesize:57192 [weak]

最后终端有以下结束行:

E: Failed to fetch http://in.archive.ubuntu.com/login.asp  File has unexpected size (1356 != 780). Mirror sync in progress? [IP: 192.168.1.1 80]
   Hashes of expected file:
    - SHA512:c476182c99f6f88fc1d648a12ec41741864ee8018368deeecb28aa949ba32d56b1af9236ad695c991b10f43df738424088fb2d45d6cc7924c1d673e0105196d9
    - SHA256:ef28327242ed49e1c77a070ced23fad258937b496f648211bd8a61e23ef08f5c
    - SHA1:1e40ce93b62e7e38baf248f0e315045e3364e3e2 [weak]
    - MD5Sum:0853cf59c24bb86a317ef80d33a2f515 [weak]
    - Filesize:110654 [weak]
E: Failed to fetch http://in.archive.ubuntu.com/login.asp  File has unexpected size (1356 != 780). Mirror sync in progress? [IP: 192.168.1.1 80]
   Hashes of expected file:
    - SHA512:db20423452f3779be43e359221151b5e4b79e5102ff7810a1dd76e7e31f7a541c9a7586de737c08257cf610287092762c94bf0fe2d67e64b223e851975f847fa
    - SHA256:fe9a51b2b9b5fb1d3a0eb6a245c6c7500a372e4ea9bd25cfa83c2749d7e593a3
    - SHA1:f5e5d76188a27c029530542023b58c0bae3a0e8f [weak]
    - MD5Sum:570270397cde85373e8208f9c44cab42 [weak]
    - Filesize:18484 [weak]
E: Failed to fetch http://in.archive.ubuntu.com/login.asp  File has unexpected size (1356 != 780). Mirror sync in progress? [IP: 192.168.1.1 80]
   Hashes of expected file:
    - SHA512:35b3b58820f667f486084c9aa8936d1ae12785b004faa134c8ff9942dcd26e4b93623f946e2db85c7a877ed26e88c11d31569b040011a8ad09fbcc1efae475f5
    - SHA256:594182eec59fe136428e174b06cf3f98d55f83d342eee37504c5478ddf828dc2
    - SHA1:0c25b537e0c73a07b9dbbdcfbdb290784a4de510 [weak]
    - MD5Sum:c3c5c67df470198ebf06fc37edfcc9f3 [weak]
    - Filesize:1064536 [weak]
E: Failed to fetch http://in.archive.ubuntu.com/login.asp  File has unexpected size (1356 != 780). Mirror sync in progress? [IP: 192.168.1.1 80]
   Hashes of expected file:
    - SHA512:c24404acdc1d3b7784e04f308a31ace5a3d4b0fb955083dad21006275e477f038d0e28fc2b50db321a1479a98adbb7aed479c8dcc3bce279a3c91d28a92d8aa6
    - SHA256:4fa57d7cd71fd8dd3a00f0de03f32071f84de75f78d093bd67b7cfc71350731d
    - SHA1:ffd0a022680a43466e18313725ad82166e8fffd6 [weak]
    - MD5Sum:19a460a3c201d21b1bbe30de39470fa5 [weak]
    - Filesize:27642780 [weak]
E: Failed to fetch http://in.archive.ubuntu.com/login.asp  File has unexpected size (1356 != 780). Mirror sync in progress? [IP: 192.168.1.1 80]
   Hashes of expected file:
    - SHA512:ebf994e5477cadfbfa1bee9ca711a379f7d2bf04698ebdf7cd3d140832416953f447da5a4a5858a46942324338ccf0b383feeb39ff3479953e8190b3ff242358
    - SHA256:e2a0c3a60a7c40458fb9c94842b26fc67bf3bd818a15f9aab1a0a60dcd2b63b8
    - SHA1:37245e495936ba805007649e7179fec0986461b3 [weak]
    - MD5Sum:7ba9f6c91cdba2abf1e496a2cc437b92 [weak]
    - Filesize:57192 [weak]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我无法理解这个问题,并且我尝试了一些解决方案但仍然面临这个问题,我该怎么办?

答案1

一些观察:

  • in.archive.ubuntu.com192.168.1.1仅当您的 DNS 已被告知这样做时,才会解析为。

  • 192.168.*.*是内部 LAN 子网,可能是网络网关

  • 看起来对来自的文件的请求192.168.1.1被重定向到登录页面。这在开放网络中很常见,开放网络会要求您先登录,然后才会向您释放开放网络流量。

如果一定要我猜的话,我会说你所在的网络需要你登录后才能使用。我会尝试在普通浏览器中访问普通页面,登录后再试一次。

否则,您可能已经尝试手动设置某种代理服务器,但我希望您知道这一点。如果您这样做了,那么您做错了。您没有设置代理,而是将 DNS 解析覆盖到不期望的服务器上。

相关内容