user3091392
user3091392

Reputation: 37

CentOS: Can't install PhP GD

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?

Upvotes: 3

Views: 10470

Answers (5)

Otheus
Otheus

Reputation: 1072

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.

Upvotes: 0

Mason.Chase
Mason.Chase

Reputation: 905

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

Upvotes: 10

Remi Collet
Remi Collet

Reputation: 7051

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).

Upvotes: 1

Nishchit
Nishchit

Reputation: 19094

Try this with php5

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

Upvotes: 0

pcfreak30
pcfreak30

Reputation: 41

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.

Upvotes: 1

Related Questions