Cannot install php5-gd package for Drupal-7.0

Asked by Ruben Gonzalez

Whenever I try to install the php5-gd package, required for the correct installation of Drupal-7.0, the following message is displayed:

/etc/php5/apache2$ 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: php5-common (= 5.3.2-1ubuntu4) but 5.3.2-2 is to be installed
E: Broken packages

However, the php5-common package is already installed in its 5.3.2-2 version. Information about this package below:

/etc/php5/apache2$ dpkg -s php5-common
Package: php5-common
Status: install ok installed
Priority: optional
Section: php
Installed-Size: 864
Maintainer: Debian PHP Maintainers <email address hidden>
Architecture: i386
Source: php5
Version: 5.3.2-2
Provides: php5-json, php5-mhash
Depends: sed (>= 4.1.1-1), libc6 (>= 2.4)
Recommends: php5-suhosin
Conflicts: php5-json, php5-mhash
Conffiles:
 /etc/cron.d/php5 38ad4ffd743224f6211259fa13bd7516
 /etc/php5/conf.d/pdo.ini 912f18e8b5be5a1d629426461eec9969
Description: Common files for packages built from the php5 source
 This package contains the documentation and example files relevant to all
 the other packages built from the php5 source.
 .
 PHP5 is an HTML-embedded scripting language. Much of its syntax is borrowed
 from C, Java and Perl with a couple of unique PHP-specific features thrown
 in. The goal of the language is to allow web developers to write dynamically
 generated pages quickly. This version of PHP5 was built with the Suhosin patch.
Homepage: http://www.php.net/
ait@zmboblvtest:/etc/php5/apache2$ /etc/php5/apache2$ dpkg -s php5-common
bash: /etc/php5/apache2$: No such file or directory
ait@zmboblvtest:/etc/php5/apache2$ Package: php5-common
Package:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Status: install ok installed
Status:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Priority: optional
Priority:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Section: php
Section:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Installed-Size: 864
Installed-Size:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Maintainer: Debian PHP Maintainers <email address hidden>
bash: syntax error near unexpected token `newline'
ait@zmboblvtest:/etc/php5/apache2$ Architecture: i386
Architecture:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Source: php5
Source:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Version: 5.3.2-2
Version:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Provides: php5-json, php5-mhash
Provides:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Depends: sed (>= 4.1.1-1), libc6 (>= 2.4)
bash: syntax error near unexpected token `('
ait@zmboblvtest:/etc/php5/apache2$ Recommends: php5-suhosin
Recommends:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Conflicts: php5-json, php5-mhash
Conflicts:: command not found
ait@zmboblvtest:/etc/php5/apache2$ Conffiles:
Conffiles:: command not found
ait@zmboblvtest:/etc/php5/apache2$ /etc/cron.d/php5 38ad4ffd743224f6211259fa13bd7516
bash: /etc/cron.d/php5: Permission denied
ait@zmboblvtest:/etc/php5/apache2$ /etc/php5/conf.d/pdo.ini 912f18e8b5be5a1d629426461eec9969
/etc/php5/conf.d/pdo.ini: line 1: syntax error near unexpected token `;'
/etc/php5/conf.d/pdo.ini: line 1: `; configuration for php PDO module'
ait@zmboblvtest:/etc/php5/apache2$ Description: Common files for packages built from the php5 source
Description:: command not found
ait@zmboblvtest:/etc/php5/apache2$ This package contains the documentation and example files relevant to all
This: command not found
ait@zmboblvtest:/etc/php5/apache2$ the other packages built from the php5 source.
The program 'the' is currently not installed. You can install it by typing:
sudo apt-get install the
ait@zmboblvtest:/etc/php5/apache2$ .
bash: .: filename argument required
.: usage: . filename [arguments]
ait@zmboblvtest:/etc/php5/apache2$ PHP5 is an HTML-embedded scripting language. Much of its syntax is borrowed
PHP5: command not found
ait@zmboblvtest:/etc/php5/apache2$ from C, Java and Perl with a couple of unique PHP-specific features thrown
from: can't read /var/mail/C,
ait@zmboblvtest:/etc/php5/apache2$ in. The goal of the language is to allow web developers to write dynamically
No command 'in.' found, did you mean:
 Command 'ink' from package 'ink' (universe)
 Command 'inc' from package 'nmh' (universe)
 Command 'inc' from package 'mailutils-mh' (universe)
in.: command not found
ait@zmboblvtest:/etc/php5/apache2$ generated pages quickly. This version of PHP5 was built with the Suhosin patch.
generated: command not found
ait@zmboblvtest:/etc/php5/apache2$ Homepage: http://www.php.net/
Homepage:: command not found

I would appreciate any type of help on this matter.

Thanks in advance.

Ruben Gonzalez.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu php5 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ankit Mathur (ankitreloaded) said :
#1

enable all the repositories in your software sources. Then, run
sudo apt-get update
sudo apt-get upgrade

Now, try installing it again, if it still does not work, post the contents of your /etc/apt/sources.list file.
Also mention what version of ubuntu you are running.

Can you help with this problem?

Provide an answer of your own, or ask Ruben Gonzalez for more information if necessary.

To post a message you must log in.