linux - 在 Debian 上安装 GD 库失败

标签 linux debian gd

我试图在我的 Debian 服务器上安装 GD 库,但出现以下错误:

# apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libapache2-mod-php5 libt1-5 php5-common php5-mcrypt php5-mysql
Suggested packages:
  php-pear
The following NEW packages will be installed:
  libt1-5 php5-gd
The following packages will be upgraded:
  libapache2-mod-php5 php5-common php5-mcrypt php5-mysql
4 upgraded, 2 newly installed, 0 to remove and 39 not upgraded.
Need to get 3120kB of archives.
After this operation, 545kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  php5-mysql php5-mcrypt libapache2-mod-php5 php5-common libt1-5 php5-gd
Install these packages without verification [y/N]? y
Err http://security.debian.org lenny/updates/main php5-mysql 5.2.6.dfsg.1-1+lenny16
  404 Not Found [IP: 128.101.240.212 80]
Err http://security.debian.org lenny/updates/main php5-mcrypt 5.2.6.dfsg.1-1+lenny16
  404 Not Found [IP: 128.101.240.212 80]
Err http://security.debian.org lenny/updates/main libapache2-mod-php5 5.2.6.dfsg.1-1+lenny16
  404 Not Found [IP: 128.101.240.212 80]
Err http://security.debian.org lenny/updates/main php5-common 5.2.6.dfsg.1-1+lenny16
  404 Not Found [IP: 128.101.240.212 80]
Err http://security.debian.org lenny/updates/main libt1-5 5.1.2-3+lenny1
  404 Not Found [IP: 128.101.240.212 80]
Err http://security.debian.org lenny/updates/main php5-gd 5.2.6.dfsg.1-1+lenny16
  404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/p/php5/php5-mysql_5.2.6.dfsg.1-1+lenny16_i386.deb  404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/p/php5/php5-mcrypt_5.2.6.dfsg.1-1+lenny16_i386.deb  404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/p/php5/libapache2-mod-php5_5.2.6.dfsg.1-1+lenny16_i386.deb  404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/p/php5/php5-common_5.2.6.dfsg.1-1+lenny16_i386.deb  404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/t/t1lib/libt1-5_5.1.2-3+lenny1_i386.deb  404 Not Found [IP: 128.101.240.212 80]
Failed to fetch http://security.debian.org/pool/updates/main/p/php5/php5-gd_5.2.6.dfsg.1-1+lenny16_i386.deb  404 Not Found [IP: 128.101.240.212 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

最佳答案

我为 security.debian.org (195.20.242.89) 获得了不同的 IP。刷新 DNS 缓存并重试,他们可能移动了 IP:

/etc/rc.d/init.d/nscd restart

然后按照提示运行

apt-get update

再次尝试安装之前

关于linux - 在 Debian 上安装 GD 库失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15001608/

相关文章:

linux - Drupal7 中的干净 URL 不起作用

mysql - 通过 debconf-set-selections 为 mysql 预配置一个空密码

带有 alpha 的 PHP gdLib 8 位 PNG

php - 使用 php 从 html 生成图像

Linux 系统命令无法通过 crontab 在 Perl 脚本中运行

java - 如何在Linux上获得用户定义的系统颜色?

linux - 简单的原始数据包捕获和发送程序

linux - gitlab-runner 在 CI 中损坏,手动工作 - Debian 发布升级出错?

php - 使用透明 PNG 作为剪贴蒙版

linux - 如何在 shell 脚本中等待模块加载完成?