Amazon MP3 Downloader on Fedora 11

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:

  1. Nobody cares about the Amazon MP3 Downloader for its own sake.
  2. The MP3 downloader is a gateway to making purchases from Amazon.
  3. Given the above, it is to Amazon’s distinct advantage to make the downloader available to as many platforms as possible.
  4. People who run Linux routinely upgrade to the latest, greatest, at the earliest opportunity.
  5. 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:

  1. Download amazonmp3.rpm from Amazon’s MP3 download site. Choose the Fedora 9 version.
  2. Snag boost-1.34.1-17.fc10.i386.rpm and openssl-0.9.8b-8.i686.rpm from the Fedora archives.
  3. Become root.
  4. Create a work directory; we’ll call it ~/work.
  5. Copy the boost, openssl, and amazonmp3 RPMS to the work directory.
  6. Change directories to the work directory.
  7. rpm2cpio boost-1.34.1-17.fc10.i386.rpm > boost.cpio
  8. rpm2cpio openssl-0.9.8b-8.i686.rpm >ssl.cpio
  9. cpio -ivd < boost.cpio
  10. cpio -ivd < ssl.cpio
  11. cd lib
  12. cp libcrypto.so.0.9.8b /lib/libcrypto.so.6
  13. cp libssl.so.0.9.8b /lib/libssl.so.6
  14. cd ../usr/lib
  15. cp libboost_date_time.so.1.34.1 /usr/lib/libboost_date_time.so.3
  16. cp libboost_signals.so.1.34.1 /usr/lib/libboost_signals.so.3
  17. cp libboost_iostreams.so.1.34.1 /usr/lib/libboost_iostreams.so.3
  18. cp libboost_thread-mt.so.1.34.1 /usr/lib/libboost_thread-mt.so.3
  19. cd ../../
  20. rpm -ivh –nodeps amazonmp3.rpm
  21. Put thumb on nose.
  22. 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 Cetacean, by Country Joe & The Fish, thanks for asking.

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

6 Responses to Amazon MP3 Downloader on Fedora 11

  1. PJ Cabrera says:

    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. :-)

  2. PJ Cabrera says:

    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

  3. Chris says:

    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.

  4. ken says:

    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-

  5. Pingback: Amazon RPM Downloader on 64-bit Fedora | ten billion butterfly sneezes

  6. Bob Brush says:

    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

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>