3

i know this question has already been asked, but it didn't have an answer that worked for me and i cannot comment as i do not have enough reputation.

I'm not able to install php-gd extension on my server.

i have php 7.1 on debian 8

here is the command i ran to try install it

sudo apt-get install php7.1-gd

and here is the output

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

any ideas how to fix it please?

g s
  • 29
  • 5
  • Seems to me you might need to report this to the guy that maintains that repo – RiggsFolly Aug 06 '19 at 13:11
  • @RiggsFolly i do, i am trying to fix it – g s Aug 06 '19 at 13:11
  • Or read this https://stackoverflow.com/questions/55318499/install-php-gd-ext-on-debian – RiggsFolly Aug 06 '19 at 13:12
  • @RiggsFolly it didn't solve the question, update is also not working – g s Aug 06 '19 at 13:14
  • You mean that `apt update` also fails? – RiggsFolly Aug 06 '19 at 13:15
  • 2
    sury.org is pretty much the defacto PHP repo for Debian - surprised you're getting a 404 on GD - though that space looks suspicious to me *org/php/ jessie/* (between php/ and jessie); your install command looks right though. – CD001 Aug 06 '19 at 13:27
  • @RiggsFolly yes – g s Aug 06 '19 at 13:34
  • That sounds like you have bigger problems than just getting GD for PHP. – RiggsFolly Aug 06 '19 at 13:35
  • 1
    @CD001 I think that's normal for APT. It hits the root of the repo and then a space, then the distro and other whatnots. For example, from installing "xcowsay" package: `Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxinerama1 amd64 2:1.1.3-1 [7908 B]` – JNevill Aug 06 '19 at 13:35
  • When I visit the root of that repo it appears to be up and running. Are you certain that the computer where you are doing this install is able to hit that site (firewall, network issues, ??) For instance can you `ping packages.sury.org` or `telnet packages.sury.org 443`? – JNevill Aug 06 '19 at 13:36
  • @CD001 it is meant to have a space by jessie, are their any other repo's i could use maybe – g s Aug 06 '19 at 13:38
  • @JNevill it works to ping – g s Aug 06 '19 at 13:47
  • I went and dug through the packages at that repo and it looks like everything is rectifying fine. In fact the php7.0-gd package that you are requesting through apt is here: `https://packages.sury.org/php/pool/main/p/php7.0/php7.0-gd_7.0.33-9+0~20190712.17+debian8~1.gbp3af52c_amd64.deb` I just downloaded it (not through apt, since I have unmet dependencies on my WSL ubuntu install). No reason why it wouldn't work though. If the `telnet` attempt works, maybe try `apt` install once again. If that fails then you can maybe try installing the `deb` directly with `dpkg`. – JNevill Aug 06 '19 at 13:51
  • The file 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 is in fact not available. So the error is quite clear about the problem. – Markus Zeller Aug 06 '19 at 13:55
  • Could this be helpful? https://stackoverflow.com/questions/35560150/php-gd-bundled-extension-without-recompiling-php-solution – Tarasovych Aug 06 '19 at 13:55
  • @JNevill i am actually using php 7.1 and the package is supposed to be at 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 but it isnt – g s Aug 06 '19 at 13:59
  • That makes sense. It's odd that apt is cool with trying to install it though... – JNevill Aug 06 '19 at 14:04

0 Answers0