Php5-mcrypt install errors

apache-2.2mcryptphp5ubuntu-9.10

Running Ubuntu 9.10 and I am trying to install the php5-mcrypt module is killing me softly. I am not sure what else to try. Anyone have any idea?

Here is the error i get:

sudo apt-get install php5-mcrypt     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-mcrypt: Depends: libltdl3 (>= 1.5.2-2) but it is not installable
               Depends: php5 but it is not going to be installed or
                        phpapi-20090626+lfs
E: Broken packages

Sources List looks like:

## main & restricted repositories
deb http://us.archive.ubuntu.com/ubuntu/ karmic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic main restricted

deb http://security.ubuntu.com/ubuntu karmic-security main restricted
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted

## universe repositories
deb http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe

deb http://security.ubuntu.com/ubuntu karmic-security universe
deb-src http://security.ubuntu.com/ubuntu karmic-security universe

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all

Best Answer

I had the same problem in Ubuntu 9.10 server (I also use php53 dotdeb repositories).
I resolved adding this line to /etc/apt/sources.list

deb http://security.debian.org/debian-security lenny/updates main

Then you should execute:

gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B

sudo apt-key add .gnupg/pubring.gpg

sudo aptitude update

sudo aptitude install libltdl3

Now after you restart apache, ...

sudo service apache2 restart

... PHP 5.3 will be working fine with mcrypt extension enabled.