sudo apt-get update 出现以下错误,因此无法更新我的系统

sudo apt-get update 出现以下错误,因此无法更新我的系统

sudo apt-get update出现以下错误(这里没有显示更长的错误)因此无法更新我的系统。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  r-cran-proto
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  libatk1.0-0:i386 libgtk2.0-0:i386
Suggested packages:
  librsvg2-common:i386
The following NEW packages will be installed
  libatk1.0-0:i386 libgtk2.0-0:i386
0 to upgrade, 2 to newly install, 0 to remove and 43 not to upgrade.
1 not fully installed or removed.
Need to get 1,747 kB of archives.
After this operation, 6,674 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
  libatk1.0-0:i386 libgtk2.0-0:i386
Install these packages without verification? [y/N] 
Err http://in.archive.ubuntu.com/ubuntu/ trusty/main libatk1.0-0 i386 2.10.0-2ubuntu2
Connection failed 
Err http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main libgtk2.0-0 i386 2.24.23-0ubuntu1.4
  Connection failed

答案1

尝试从中删除“in.”http://in.archive.ubuntu.com

/etc/apt/sources.list

现在你可以采取以下措施来实现自动化:

sudo sed -i 's/in.archive/archive/g' /etc/apt/sources.list
sudo apt-get update -y
sudo sed -i 's/archive/in.archive/g' /etc/apt/sources.list

相关内容