Sunday, December 20, 2009

Installing the (32-bit) Amazon.com MP3 Downloader in 64-bit Ubuntu 9.04 (well, probably any 64-bit version of Ubuntu)

Amazon.com's MP3 store is massive.  If you're anything like me (although you probably aren't), you'd like to download full albums using the Amazon.com MP3 Downloader, but are running into one massive problem: the downloader for Ubuntu 9.04 is 32-bit, and your installation is 64-bit.

No worries!  It's doable.  From the command line, that is.  This guide assumes a whole host of things, like that you've already downloaded the Amazon.com MP3 Downloader, are capable of utilizing command-line instructions, know how to type, know how to read, are actually in need of these instructions, etc.

First, go ahead and force the 32-bit installation (and resolve a bunch of initial dependencies) like so:

sudo dpkg -i --force-all amazonmp3.deb
sudo apt-get install ia32-libs lib32nss-mdns

Now, install the package 'getlibs-all.deb' from http://frozenfox.freehostia.com/cappy/.  This script will allow you to easily install 32-bit libraries on your 64-bit system.

You'll run getlibs like so:

sudo getlibs /usr/bin/amazonmp3

The utility will install what it is able to, but return errors when it can't match certain dependencies.  This is expected.  Keep a list of the unmatched dependencies, as we'll sort that out next.

Right now we need to figure out how the Ubuntu developers renamed the packages we couldn't match.  The naming differences are minor, for example libglademm-2.4-1 might be renamed to libglademm-2.4-1c2a.  The key is to use the auto-complete functionality in apt-get to determine the new package names.  Keep a list of the new package names as you find them, as we'll use getlibs to install the 32-bit versions (apt-get will install the 64-bit versions, which is useless for our purpose).  If you're looking for the new version of libglademm-2.4-1, you would locate it by typing 'apt-get install libglademm-2.4-1' and tapping the Tab key several times.  In this instance, you'll see that there is still a libglademm-2.4-1 package, but attempting to install it will yield a message indicating it is only a placeholder for the newer version.

When you're done, you might have a list including such (new) packages as:

libglademm-2.4-1c2a libgtkmm-2.4-1c2a libpangomm-1.4-1 libcairomm-1.0-1 libglibmm-2.4-1c2a libboost-filesystem1.34.1 libboost-regex1.34.1 libboost-date-time1.34.1 libboost-signals1.34.1 libboost-iostreams1.34.1 libboost-thread1.34.1

In order to install these, you will need to invoke the getlibs utility like so:

sudo getlibs -p libglademm-2.4-1c2a libgtkmm-2.4-1c2a libpangomm-1.4-1 libcairomm-1.0-1 libglibmm-2.4-1c2a libboost-filesystem1.34.1 libboost-regex1.34.1 libboost-date-time1.34.1 libboost-signals1.34.1 libboost-iostreams1.34.1 libboost-thread1.34.1

The -p flag tells the script that we would like to install the 32-bit packages by those names.

That's pretty much it.  Once the dependencies are met, you'll need to run getlibs like we did the first time around, as there may be new dependencies which depend on the freshly resolved/installed dependencies (whew!):

sudo getlibs /usr/bin/amazonmp3

Once you know what the new dependencies are, you will follow the same installation process.  I believe the final dependency is libicu38.  Once getlibs tells you all dependencies have been met, you're set to run the Amazon.com MP3 Downloader from you Applications -> Internet menu.

If this has been of any use to you, please let me know in the comments!

No comments: