无法更新 Linux 标头,仍为 0%

无法更新 Linux 标头,仍为 0%

我安装了 Ubuntu 18.04。当我尝试安装 Java 或尝试使用sudo apt update它进行更新时,显示以下内容:

leonardo@lherrera:~$ sudo apt update
[sudo] password for leonardo: 
Hit:1 file:/var/cuda-repo-10-0-local-10.0.130-410.48  InRelease
Ign:1 file:/var/cuda-repo-10-0-local-10.0.130-410.48  InRelease
Hit:2 file:/var/cuda-repo-10-0-local-10.0.130-410.48  Release [574 B]
Hit:2 file:/var/cuda-repo-10-0-local-10.0.130-410.48  Release [574 B]
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                   
Obj:5 http://dl.google.com/linux/chrome/deb stable Release                     
Obj:7 http://ppa.launchpad.net/maarten-fonville/ppa/ubuntu bionic InRelease    
Err:8 http://192.168.1.245/ubuntu bionic InRelease                             
  Connection failed [IP: 192.168.1.245 80]
Reading package list... Done
Building adependency tree       
Reading state information... Done
1 package can be upgraded. Run "apt list --upgradable" to see it.
W: Failed to fetch http://192.168.1.245/ubuntu/dists/bionic InRelease  
  Connection failed [IP: 192.168.1.245 80]  
W: Some index files could not be downloaded, were omitted, or old ones were used instead.

答案1

192.168.1.245 处的存储库存在问题(这是私有的内部 IPv4 地址)。这是(英语翻译的)错误消息:

Err: 8 http://192.168.1.245/ubuntu bionic InRelease
  The connection failed [IP: 192.168.1.245 80] 
...
W: Failed to obtain http://192.168.1.245/ubuntu/dists/bionic/InRelease The connection failed [IP: 192.168.1.245 80]

问题在于您的/etc/apt/sources.list文件中的服务器或某个文件中的文件中/etc/apt/sources.list.d/

您可以通过注释掉引用该 IP 地址的行,然后再次运行更新过程来解决这个问题。但是,如果这应该是实际的存储库服务器,那么您需要修复该服务器或让运行它的任何人知道它需要修复。

相关内容