首页 > 解决方案 > 如何修复 php-gd 无法安装 debian

问题描述

我知道这个问题已经被问过了,但它没有一个对我有用的答案,我无法发表评论,因为我没有足够的声誉。

我无法在我的服务器上安装 php-gd 扩展。

我在 debian 8 上有 php 7.1

这是我尝试安装它的命令

sudo apt-get install php7.1-gd

这是输出

Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libelf1 libfontenc1 libgl1-mesa-dri libgl1-mesa-glx
  libglapi-mesa libice6 libpciaccess0 libsm6 libtxc-dxtn-s2tc0 libutempter0 libx11-xcb1 libxaw7 libxcb-dri2-0
  libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-shape0 libxcb-sync1 libxcomposite1 libxcursor1 libxdamage1
  libxfixes3 libxfont1 libxft2 libxi6 libxinerama1 libxkbfile1 libxmu6 libxrandr2 libxrender1 libxshmfence1 libxt6
  libxtst6 libxv1 libxxf86dga1 libxxf86vm1 vnc4server x11-apps x11-common x11-session-utils x11-utils x11-xkb-utils
  x11-xserver-utils xbase-clients xbitmaps xfonts-base xfonts-encodings xfonts-utils xinit xterm
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  php7.1-gd
0 upgraded, 1 newly installed, 0 to remove and 164 not upgraded.
Need to get 27.7 kB of archives.
After this operation, 138 kB of additional disk space will be used.
Get:1 https://packages.sury.org/php/ jessie/main php7.1-gd amd64 7.1.15-1+0~20180306120119.15+jessie~1.gbp78327e [27.7 kB]
Err https://packages.sury.org/php/ jessie/main php7.1-gd amd64 7.1.15-1+0~20180306120119.15+jessie~1.gbp78327e
  HttpError404
E: Failed to fetch https://packages.sury.org/php/pool/main/p/php7.1/php7.1-gd_7.1.15-1+0~20180306120119.15+jessie~1.gbp78327e_amd64.deb  HttpError404

任何想法如何解决它?

标签: phpphp-gd

解决方案


推荐阅读