Installing php5-ming on Dapper

I ran into a package today that I couldn’t find in the repos for Dapper. So I had to figure out a way to get it on there.

Luckily I ran into mah online, and I asked him for some dpkg-fu. He was kind enough to give me a hand getting this working. Here is what we did.

First, I added a Feisty repo to my sources.list so I could grab the source files and patch them for Debian.

echo "deb-src http://us.archive.ubuntu.com/ubuntu/ feisty main universe" >> /etc/apt/sources.list

Next we had to increase the cache size for apt so it wouldn’t choke on the new repo

echo "APT::Cache-Limit \"33554432\";" >> /etc/apt/apt.conf

Then, you can update and install the source files

sudo apt-get update
apt-get source php5-ming

This should, among other things create a directory called ming-0.3.0. Next, see what deps are missing. Install them.

cd ming-0.3.0/
debuild -uc -us -b

This will tell you all the packages you need. The only one you won’t be able to install is python-central…who cares python sucks anyway. Let’s get rid of the need for it.

vi debian/rules

Change lines 25 and 26 to

#PYDEF=$(shell pyversions -d)
#PYVERS=$(shell pyversions -r)

And lines 181 and 182 to

#dh_pycentral
#dh_python

Now we are ready to build…but we’ll have to force it.

debuild -uc -us -b -d

In the parent directory (after that finishes) there will be a bunch of deb’s. Just install the lib-ming, and the php5-ming deb’s.

sudo dpkg -i php5-ming_0.3.0-11ubuntu1_i386.deb libming0_0.3.0-11ubuntu1_i386.deb

One last thing, you have to enable the use of ming in the php.ini file

echo "extension=ming.so" >> /etc/php5/apache2/php.ini

Then restart Apache.

That’s it. You can also now take those deb’s and use them on any Dapper machine…though, as mah pointed out…I wouldn’t use the Python ones if I were you :)

About Nathan Powell

I am a middle aged technologist freak-ball.
This entry was posted in sysadmin. Bookmark the permalink.

2 Responses to Installing php5-ming on Dapper

  1. Nicolas says:

    Thank you very much! I had a problem with “debhelper” not being the right version but debuild was “forced” it did the job anyway. Up to now, everything works great. Should I expect surprises down the line?
    In any case, thank you very much for this documentation.

  2. You should not expect surprises, this has been working fine for me.