Changing deb package architecture

0
1954

We have several PHP applications and libraries incorrectly packaged for i386 rather than all, which means they wont install to our nice new shiny AMD64 servers. Unfortunately we don’t have (or at least we can’t find) the original package sources, so we need to ‘frobble’ the packages and change the arch by hand!

Deb files are just an ar package so we must first extract it! (FYI ar is like tar, but for pirates .. 🙁 )

The control.tar.gz is the one that contains all our precious arch information, so we must extract it!

open up the control file and edit in the arch you want (in our case, all)

I’m going to increment the package version to -2 as well to signify that it’s just the packaging that has changed.

Now we delete the original control.tar.gz file and rebuild it.

We now just need to use ar again to create our debian package!

And there we have it, a shiny new package of arch all that can be installed anywhere!

SHARE
Previous articleTurning CPAN modules in to deb with dh perl make
Next articlexend refusing to start
Hi, I'm Rus and after 10 years of Linux administration and software development, in September 2014 I quit my day job, sold all my stuff and moved to Thailand to live the good life. My new website, http://www.ruspow.com shows how I'm making money online as well as what life can be like when you're not sat behind a desk and are free to make your own decisions!