3

2 of my sites are not working bcs I can't install php5-gd library to Debian Wheezy php5.6 ...

I tried

aptitude install php5-gd, and system said i miss 2 dependencies, which i can not find or install...

aptitude install php5-gd

sudo apt-get install php5-gd

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:

php5-gd :
Depends: libt1-5 (>= 5.1.0) but it is not installable

Depends: libvpx1 (>= 1.0.0) but it is not installable

E: Unable to correct problems, you have held broken packages.
Ivan
  • 14,692
  • 17
  • 59
  • 96
  • Can you run `apt-cache policy php5-gd` and update with what you get for output? – Christos Lytras Mar 23 '20 at 01:00
  • Have you somehow changed your apt-source? It looks like some mixed repositories for Wheezy and Jessie! – Abdullah Al Farooq Mar 25 '20 at 07:32
  • I doubt the op responds.. it seems the only message he sent. BTW I have the same problem: no repos changed from a legacy wheezy and the `apt-cache` result is Installed: (none), Candidate: (none), Version table empty. – Ivan Mar 25 '20 at 14:20
  • @Ivan (and @Milos) – Wheezy is way too old. Upgrade or at least add a newer release to your sources so you can select newer packages; see [my answer](https://stackoverflow.com/a/60852720/519360) for details. – Adam Katz Mar 25 '20 at 16:13
  • @Ivan literally every scrap of this is dangerously, inadvisably out of date. You need to upgrade to both a version of PHP and an OS that aren't EOL. – Sammitch Mar 25 '20 at 22:39
  • Of course and I'd like it, but it's not my system and really there's no a big security concern with that (not a production system). – Ivan Mar 26 '20 at 14:53

3 Answers3

2

Have you updated your apt-get first?

First, run:

sudo apt-get update

Then if that is successful run;

sudo apt-get upgrade

if you run df -lah

first, it may show your /boot is at 100% Try; sudo apt-get autoremove

then start from the start, and then try your php5-gd

When that fails Try :

sudo apt-get install -f
MrPHP
  • 932
  • 2
  • 7
  • 19
  • sudo apt-get update - all OK upgrade - Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. df -lah /dev/md1 496M 39M 432M 9% /boot sudo apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. other all same, when i try to install ...GD – Milos Novakovic Aug 18 '19 at 09:32
  • again same message 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. – Milos Novakovic Aug 18 '19 at 09:52
2

Wheezy is really out of date. It was released in 2013 and its support ended in 2018.

Here's a table imported from the Debian Long Term Support page:

support table, presented as text in the above link

Your best bet is to upgrade to buster (Debian 10, released July 2019 and (probably) supported through 2024.

Another option is to upgrade to jessie (released April 2015, security support ended 2018, community support ends June 2020), which would buy you a few months to replace your system with a newer one.

The final option, if you really need to stay on Wheezy, is to use backports or a carefully-pinned newer release for just the packages in question.

Since Wheezy is so old, there aren't any repositories still being hosted (there's probably an archive of it somewhere, but you won't get updates). I'll walk you through upgrading to Jessie and using its backports instead.

These instructions should work for any release, so you could (should!) use buster in place of jessie, though upgrading across so many releases will almost certainly require quite a bit of work.

1. Update your sources:

$ find /etc/apt/sources.list* -name '*.list' |sudo xargs sed -i 's/wheezy/jessie/g'

2. Add Jessie backports to one of those files if it doesn't yet exist:

deb http://deb.debian.org/debian jessie-backports main

3. Update and upgrade, ideally from outside X11 (e.g. the console at Ctrl+Alt+F2):

$ sudo apt-get clean
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get autoremove
$ sudo reboot

After that, you can then try to troubleshoot your system.

Adam Katz
  • 14,455
  • 5
  • 68
  • 83
  • Cannot upgrade, this is not an option. Of course, going to jessie or, better, buster will be the best option, but it is not. So given the problem (2 unmet dependencies) I'm doing a bounty for finding the effortless solution (just a patch to get rid of the problem for a while and focus on the real problem that is not this). – Ivan Mar 26 '20 at 15:00
  • Could you elaborate on why you cannot upgrade? Can you pull in another release's sources and then selectively pin the new release just for the packages in question? That's what I was alluding to. – Adam Katz Mar 29 '20 at 21:16
  • The server's owner (a friend) has some important stuff in this system and is afraid what will happen if we upgrade (seems that has had some bad experiences with that). Any way, we have decided not to use GD and that resolves the problem (although I know that the real problem is to have an outdated OS). – Ivan Mar 30 '20 at 18:09
  • 1
    Yeah, be very careful, be aggressive on your firewall, make sure you stop using deprecated cyphers and protocols, etc. – Adam Katz Mar 30 '20 at 18:31
0

You should build it manually From: https://www.howtoforge.com/building-php-5.4-from-source-on-debian-squeeze

flakerimi
  • 2,580
  • 3
  • 29
  • 49