无法安装 openssh 服务器

无法安装 openssh 服务器
sudo apt-get install openssh-server

我收到此错误:

Err mirror://mirrors.ubuntu.com/mirrors.txt/ precise-updates/main openssh-server i386 1:5.9p1-5ubuntu1.4
  No mirror file '/var/lib/apt/mirrors/mirrors.ubuntu.com_mirrors.txt' found  [Mirror: ]
Err mirror://mirrors.ubuntu.com/mirrors.txt/ precise/main ssh-import-id all 2.10-0ubuntu1
  No mirror file '/var/lib/apt/mirrors/mirrors.ubuntu.com_mirrors.txt' found  [Mirror: ]
Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/o/openssh/openssh-server_5.9p1-5ubuntu1.4_i386.deb  No mirror file '/var/lib/apt/mirrors/mirrors.ubuntu.com_mirrors.txt' found  [Mirror: ]
Failed to fetch mirror://mirrors.ubuntu.com/mirrors.txt/pool/main/s/ssh-import-id/ssh-import-id_2.10-0ubuntu1_all.deb  No mirror file '/var/lib/apt/mirrors/mirrors.ubuntu.com_mirrors.txt' found  [Mirror: ]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我的/etc/apt/sources.list内容是:

deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse

为何以及怎样解决它?

答案1

我认为您的问题可能与这个错误有关:https://bugs.launchpad.net/ubuntu/+source/apt-cacher-ng/+bug/1020995。我也尝试在 Ubuntu 14.04 上使用镜像功能,但出现了一些错误。

您可以备份 /etc/apt/sources.list 文件

sudo mv /etc/apt/sources.list /etc/apt/sources.list.orig

并创建一个新的,内容如下。替换ro.archive.ubuntu.com带有您所在国家/地区的首字母(例如 fr、de、us 等)。

#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################

###### Ubuntu Main Repos
deb http://ro.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://ro.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse 
deb http://ro.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse 
deb http://ro.archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse 
deb http://ro.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu precise partner

###### Ubuntu Extras Repo
deb http://extras.ubuntu.com/ubuntu precise main

然后运行:

sudo apt-get update
sudo apt-get install openssh-server

相关内容