-1

when i tried to install php7.0-gd i found this error

dfiadm@dc2-magneto-test:~$ sudo apt-get install php7.0-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: php7.0-gd : Depends: libgd3 (>= 2.1.1) but it is not going to be installed Depends: libxpm4 but it is not installable E: Unable to correct problems, you have held broken packages.

output of this command : apt-cache policy php7.0-gd

php7.0-gd:
  Installed: (none)
  Candidate: 7.0.33-57+ubuntu20.04.1+deb.sury.org+1
  Version table:
     7.0.33-57+ubuntu20.04.1+deb.sury.org+1 500
        500 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 Packages
     7.0.33-57+0~20211119.61+debian9~1.gbp5d8ba5 500
        500 https://packages.sury.org/php stretch/main amd64 Packages

my os ubuntu server LTS 20.04

1 Answers1

0

Sury PPA + Ubuntu20.04 here. Those packages are fine and installable, but the problem in your case should be fixed by

apt install -f libgd3 libxpm4

To figure out what are your options for the package, you can use

apt-cache policy libxpm4

Which should give you something like

libxpm4:
  Installed: 1:3.5.12-1
  Candidate: 1:3.5.12-1
  Version table:
 *** 1:3.5.12-1 500
        500 http://pl.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

Jan Myszkier
  • 1,243
  • ("this is the output when i run this command" )

    Package libxpm4 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'libxpm4' has no installation candidate

    – Hamad Al-Shabrawi Mar 10 '22 at 10:23
  • @HamadAl-Shabrawi please check the apt-cache I have listed above. – Jan Myszkier Mar 10 '22 at 12:59