无法在我的 aws lamp ubuntu 服务器上安装任何东西

无法在我的 aws lamp ubuntu 服务器上安装任何东西

我正在尝试在我的 aws 实例上的 lamp 服务器上安装 unzip 和 vsftpd,但尝试安装任何东西都会导致以下错误:

$ sudo apt-get install vsftpd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  vsftpd
0 upgraded, 1 newly installed, 0 to remove and 82 not upgraded.
Need to get 111 kB of archives.
After this operation, 361 kB of additional disk space will be used.
Err http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main vsftpd amd64 3.0.2-1ubuntu2.14.04.1
  Could not resolve 'ap-southeast-1.ec2.archive.ubuntu.com'
E: Failed to fetch http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/pool/main/v/vsftpd/vsftpd_3.0.2-1ubuntu2.14.04.1_amd64.deb  Could not resolve 'ap-southeast-1.ec2.archive.ubuntu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我已尝试 apt-get update 和 --fix-missing 但仍然无法安装任何新内容。

版本详细信息如下:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:    14.04
Codename:   trusty

答案1

您可以尝试以下

1.) 使用用户数据启动实例,例如:

cloud-config

apt_镜像:http://us.archive.ubuntu.com/ubuntu/

以上内容将允许 cloud-config 的其他部分(假设 apt 已正确设置)正常工作。

然后尝试 apt-get update 和 apt-get install

答案2

我不确定这样做是否正确,但我通过将 /etc/apt/sources.list 中的 apt-get 镜像更改为http://us.archive.ubuntu.com/ubuntu/但为了以防万一,我备份了该文件。

相关内容