Amazon was less than understanding about my request for source code for their MP3 downloader. They were prompt and courteous in their response; that alone is rare. They don’t release source, and gosh, why don’t I use a Fedora release on which the downloader has been tested? Well, first, because it’s Fedora 9, two releases ago.
I was tempted to engage in an e-mail exchange with them, in which I’d point out that:
- Nobody cares about the Amazon MP3 Downloader for its own sake.
- The MP3 downloader is a gateway to making purchases from Amazon.
- Given the above, it is to Amazon’s distinct advantage to make the downloader available to as many platforms as possible.
- People who run Linux routinely upgrade to the latest, greatest, at the earliest opportunity.
- A legion of package maintainers would be happy to recompile and package the downloader for newer Linux releases.
I still think Amazon should open source the downloader. But, to do business with them on Fedora 11, do the following; these instructions are for 32 bit systems; they should be easily modifiable to work on 64 bit installations:
- Download amazonmp3.rpm from Amazon’s MP3 download site. Choose the Fedora 9 version.
- Snag boost-1.34.1-17.fc10.i386.rpm and openssl-0.9.8b-8.i686.rpm from the Fedora archives.
- Become root.
- Create a work directory; we’ll call it ~/work.
- Copy the boost, openssl, and amazonmp3 RPMS to the work directory.
- Change directories to the work directory.
- rpm2cpio boost-1.34.1-17.fc10.i386.rpm > boost.cpio
- rpm2cpio openssl-0.9.8b-8.i686.rpm >ssl.cpio
- cpio -ivd < boost.cpio
- cpio -ivd < ssl.cpio
- cd lib
- cp libcrypto.so.0.9.8b /lib/libcrypto.so.6
- cp libssl.so.0.9.8b /lib/libssl.so.6
- cd ../usr/lib
- cp libboost_date_time.so.1.34.1 /usr/lib/libboost_date_time.so.3
- cp libboost_signals.so.1.34.1 /usr/lib/libboost_signals.so.3
- cp libboost_iostreams.so.1.34.1 /usr/lib/libboost_iostreams.so.3
- cp libboost_thread-mt.so.1.34.1 /usr/lib/libboost_thread-mt.so.3
- cd ../../
- rpm -ivh –nodeps amazonmp3.rpm
- Put thumb on nose.
- Wave remaining fingers toward Amazon.
I’ve downloaded one MP3 from Amazon since doing this, as a test run1. The MP3 was placed in ~/Music/artist/album_name/track_name. So, in my test case, the MP3 wound up in:
/home/knelson/Music/Amazon MP3/Country Joe And The Fish/Together/10 – Cetacean.mp3
And, it plays. I use Songbird, which gladly imports tracks from the aforementioned directory.
It would be trivial to hack up Amazon’s RPM, and include the libraries; or alternatively, to gin up another RPM which contains these libs. I’ll leave that for another day.
-k-
1

![Validate my Atom 1.0 feed [Valid Atom 1.0]](http://www.quietvoice.org/wp-images/valid-atom.png)
Hey, great hack, and you did it just to give money to the man, too. That qualifies as a TWAC moment in my book. And you get to keep your crown, but just this once.
I’ll be writing up about my own TWAC/Linux hack moment soon. I hacked Android onto a Palm TX. I had to take the current Palm TX kernel and hack in by hand the Android kernel patches. Took me DAYS. LOL
Sadly it doesn’t seem to work on 64-bit. The rpm must have been built as 32-bit. The error I’m getting is:
“amazonmp3: error while loading shared libraries: libgtkmm-2.4.so.1: cannot open shared object file: No such file or directory”.
That lib is in /usr/lib64 but it’s not picked up. I’ve tried linking /usr/lib/libgtkmm-2.4.so.1 to the one in lib64 but then I get:
“amazonmp3: error while loading shared libraries: libgtkmm-2.4.so.1: wrong ELF class: ELFCLASS64″
Oh well, I’ve got Fedora 9 on the laptop so I’ll download with that. Shame on Amazon though.
Chris:
Good point. It is a 32-bit RPM, so you’d need the 32-bit version of libgtkmm-2.4.so.1. THe 64-bit version would not function with amazonmp3, and would produce an error. The 32 bit version of libgtkmm should install in /usr/lib, and be just fine. You would need 32 bit versions of all the libraries that amazonmp3 requires.
I’ve not tried this, but it *should* work.
-k-
Pingback: Amazon RPM Downloader on 64-bit Fedora | ten billion butterfly sneezes
Fedora 11 x64 Amazon MP3
This worked, but I don’t have any other machines to verify. I hope it can help:
yum install libcurl.i586 gtkmm24.i586 gtk-nodoka-engine.i586 libcanberra-gtk2.i586 PackageKit-gtk-module.i586 bug-buddy.i586
wget mirrors.kernel.org/fedora/releases/9/Fedora/i386/os/Packages/boost-1.34.1-13.fc9.i386.rpm
mv boost-1.34.1-13.fc9.i386.rpm /
cd /
rpm2cpio boost-1.34.1-13.fc9.i386.rpm | cpio -ivd ./usr/lib/libboost_thread-mt.so.1.34.1 ./usr/lib/libboost_iostreams.so.1.34.1 ./usr/lib/libboost_signals.so.1.34.1 ./usr/lib/libboost_date_time.so.1.34.1
ln -s /usr/lib/libboost_thread-mt.so.1.34.1 /usr/lib/libboost_thread-mt.so.3
ln -s /usr/lib/libboost_iostreams.so.1.34.1 /usr/lib/libboost_iostreams.so.3
ln -s /usr/lib/libboost_signals.so.1.34.1 /usr/lib/libboost_signals.so.3
ln -s /usr/lib/libboost_date_time.so.1.34.1 /usr/lib/libboost_date_time.so.3
http://www.amazon.com/gp/dmusic/help/amd.html?&forceos=LINUX
(use browser to accept and download to /software)
rpm -Uvh amazonmp3.rpm –nodeps
ln -s /usr/lib/libcrypto.so.0.9.8k /usr/lib/libcrypto.so.6
ln -s /usr/lib/libssl.so.0.9.8k /usr/lib/libssl.so.6