Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to install php5-gd and receive this error

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-gd 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 php5-gd has no installation candidate

I am not sure why this would be, I checked dpkg -l | grep php and noticed php5-gd was installed at one point. I am not sure why it or how it was removed but I need it installed.

dpkg -l | grep php
rc  php5-gd                         5.2.10.dfsg.1-2ubuntu6                          GD module for php5
ii  libapache2-mod-php5             5.2.10.dfsg.1-2ubuntu6                          server-side, HTML-embedded scripting languag
ii  php5                            5.2.10.dfsg.1-2ubuntu6                          server-side, HTML-embedded scripting languag
ii  php5-cli                        5.2.10.dfsg.1-2ubuntu6                          command-line interpreter for the php5 script
ii  php5-common                     5.2.10.dfsg.1-2ubuntu6                          Common files for packages built from the php
ii  php5-mysql                      5.2.10.dfsg.1-2ubuntu6                          MySQL module for php5

I have checked my sources.list, here it is:

http://pastie.org/7699452 (the paste was too long so I opt'd to use a paste service)

I have ran apt-get update as well to be sure.

Could anyone recommend how I can fix this so I can get php5-gd installed?

share|improve this question
    
Show us output of: apt-cache policy php5-common –  oerdnj Apr 24 '13 at 6:38

1 Answer 1

up vote 1 down vote accepted

My reputation isn't big enough to comment, but here is what I wanted to say:

Did you try adding another mirror to your sources? Example:
create a new file called /etc/apt/sources.list.d/alternative_Repo.list containing this:

deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted

This will make sure that your package manager has access to an up-to-date official mirror in case your main mirror is lagging behind.

I looked at https://launchpad.net/ubuntu/+archivemirrors and kernel.org is quite behind in many countries. Due to how mirrors works, they can't be up to date all the time. In the netherlands, as example, it's pretty bad: Kernel.org http ftp rsync 1 Gbps Last update unknown

I hope it helps!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.