我们可以使用 wget 来获取其他 URL,例如 google.com,但是 wget security.ubuntu.com 不起作用,并且给出输出:
Resolving security.ubuntu.com (security.ubuntu.com)... 91.189.92.200, 91.189.92.201, 91.189.88.149, ...
Connecting to security.ubuntu.com (security.ubuntu.com)|91.189.92.200|:80... failed: Connection timed out.
apt-get 也不起作用。apt-get install php5-curl 给出以下内容:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
checkbox gnome-dictionary gnome-search-tool libgdict-1.0-6 libgdict-common printer-driver-hpijs python3-checkbox
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libapache2-mod-php5 php5-cli php5-common php5-gd php5-mysql php5-readline
Suggested packages:
php-pear php5-user-cache
The following NEW packages will be installed:
php5-curl
The following packages will be upgraded:
libapache2-mod-php5 php5-cli php5-common php5-gd php5-mysql php5-readline
6 upgraded, 1 newly installed, 0 to remove and 283 not upgraded.
Need to get 4,864 kB of archives.
After this operation, 142 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
php5-readline php5-cli php5-mysql php5-gd libapache2-mod-php5 php5-common php5-curl
Install these packages without verification? [y/N] y
0% [Connecting to us-east-1.ec2.archive.ubuntu.com (91.189.91.13)]
但同一 VPC 中的另一台服务器(实际上是 Amazon 上的 AMI 的副本)也在运行。两台服务器(运行的服务器和不运行的服务器)的配置完全相同。
无法正常工作的服务器的外部IP地址:
54.210.0.128 54.210.0.13
谢谢
答案1
跑步
sudo apt-get update
然后请发布任何错误。
如果没有错误,请sudo apt-get install
再次使用后跟包名称。
如果您想从 Ubuntu 档案库中下载某些内容,请使用apt-get download
不带 sudo 的命令并后跟包名称,将您需要的任何包下载到您当前的目录。
答案2
在我的网络浏览器中输入 security.ubuntu.com 会将其重定向到 www.ubuntu.com/usn,这可能是您无法下载该网站的原因。“wget”用于下载目标地址。
对于您的 apt-get 问题,请尝试更改 ubuntu 服务器以进行更新。这通常有效。