3

I have a VPS with CentOS 6 in which I am trying to install PhP GD. I have tried sudo yum install php-gd as I read in other StackOverflow questions. When I do this, I get the following:

Error: Package: php-gd-5.5.21-1.el6.remi.x86_64 (remi-php55)
          Requires: gd-last(x86-64) >= 2.1.0-3
Error: Package: php-gd-5.5.21-1.el6.remi.x86_64 (remi-php55)
          Requires: libgd.so.3() (64bit)

Any idea on what can I do to install Php-Gd and solve this?

gen_Eric
  • 223,194
  • 41
  • 299
  • 337
user3091392
  • 37
  • 2
  • 5

5 Answers5

10

It turns out you need gd-last from epel,

try:

yum install gd-last --enablerepo=epel

and then

yum install php-gd --enablerepo=remi,remi-php55

Mason.Chase
  • 897
  • 1
  • 10
  • 21
1

Install

ftp://fr2.rpmfind.net/linux/remi/enterprise/6/remi/x86_64/gd-last-2.1.0-3.el6.remi.x86_64.rpm

manually

I had the same issue, and this got everything working.

pcfreak30
  • 41
  • 1
  • 4
1

Permanent link is http://rpms.remirepo.net/enterprise/6/remi/x86_64/repoview/gd-last.html

As explained in remi.repo file and in the FAQ, remi-php55 also need remi for its dependencies (such as this one).

Remi Collet
  • 6,198
  • 1
  • 20
  • 25
0

Try this with php5

yum install php-gd --enablerepo=remi,remi-php55

Nishchit
  • 18,284
  • 12
  • 54
  • 81
0

Puppet users might appreciate this Hiera/YAML code for help dealing with this problem:

system::packages:
  'remi-release':
    # ensure: '7.5-2.el7.remi'
    source: 'https://rpms.remirepo.net/enterprise/remi-release-7.rpm'
    provider: 'rpm'

  'php':
    ensure: true
    require:
      - 'Package[remi-release]'

  'php-gd':
    ensure: true
    require:
      - 'Package[remi-release]'
      - 'Exec[enable-remi-safe]'

system::execs:
  'enable-remi-safe':
    command: 'yum-config-manager --enable remi-safe |grep -qEx "^enabled = (1|True)"'
    unless:  'yum-config-manager remi-safe |grep -qEx "^enabled = (1|True)"'
    require: 'Package[remi-release]'

The voxpupuli "system" module lets you easily map hiera keys and values into standard resource primitives. If you don't use Hiera or System, this above 'code' is easily done using the standard puppet resource declarations.

Otheus
  • 785
  • 10
  • 18