Install Amazon MP3 Downloader on Ubuntu 9.04 x86-64

The Amazon MP3 Downloader is available for Ubuntu but only as a 32 bit binary. You can install this on your 64 bit PC as follows:

$ sudo dpkg -i --force-architecture amazonmp3.deb
$ sudo getlibs /usr/bin/amazonmp3

    • Wes Morriston
    • July 19th, 2009

    Running Ubuntu 9.04 on an intel x86-64.

    Did the two steps mentioned above. No dice. I get these messages when I run amazonmp3 from a terminal window.
    ———–
    Gtk-Message: Failed to load module “canberra-gtk-module”: /usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so: wrong ELF class: ELFCLASS64
    /usr/lib/gio/modules/libgiogconf.so: wrong ELF class: ELFCLASS64
    Failed to load module: /usr/lib/gio/modules/libgiogconf.so
    /usr/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
    Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so
    /usr/lib/gio/modules/libgioremote-volume-monitor.so: wrong ELF class: ELFCLASS64
    Failed to load module: /usr/lib/gio/modules/libgioremote-volume-monitor.so
    ————

    Made the mistake of buying a couple of songs. All I get from amazonmp3 when it runs is “Can’t connect. Check your internet connection and retry download.”

    Wes

    • You are getting this error because you only have the 64-bit library available. There’s a couple of things you can try.

      $ sudo apt-get install ia32-libs
      $ sudo getlibs -l libgvfsdbus.so libgioremote-volume-monitor.so libgiogconf.so

      Please let me know how you get on and I’ll update the post. Thanks.

    • par
    • July 19th, 2009

    tried the first 2 commands along with the ones regarding the 32bit libs, the following are the outcome:

    Original commands:

    par@par-desktop:~$ sudo dpkg -i –force-architecture amazonmp3.deb
    dpkg: error processing amazonmp3.deb (–install):
    cannot access archive: No such file or directory
    Errors were encountered while processing:
    amazonmp3.deb
    par@par-desktop:~$ sudo getlibs /usr/bin/amazonmp3
    sudo: getlibs: command not found
    par@par-desktop:~$

    Getlibs commands:

    par@par-desktop:~$ sudo apt-get install ia32-libs
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    ia32-libs is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    par@par-desktop:~$ sudo getlibs -l libgvfsdbus.so libgioremote-volume-monitor.so libgiogconf.so
    sudo: getlibs: command not found
    par@par-desktop:~$

    • par
    • July 20th, 2009

    Just to let you know, I got it up and running using the desktop command. I dont know how to use all those commands being such an amateur.

    • Wes Morriston
    • July 22nd, 2009

    I had already installed i132-libs. I did this:

    $ sudo getlibs -l libgvfsdbus.so libgioremote-volume-monitor.so

    Those libraries are now installed.

    Alas, I still get the same error messages when I run amazonmp3 from a terminal. It’s my belief that all the needed 32-bit libraries are in /usr/lib32, but amazonmp3 isn’t “seeing” them. I tried exporting the LD_LIBRARY_PATH=/usr/lib32 before running amazonmp3, but got the same result.

    I wonder if unbuntu 9.04 has some other way of letting programs “find” the libraries in /usr/lib32?

    Any help would be most appreciated.

    • Wes Morriston
    • July 22nd, 2009

    Let me add a bit of evidence for my claim that amazonmp3 isn’t looking for the 32-bit libraries in the right place. Consider this error message.
    ——-
    Failed to load module: /usr/lib/gio/modules/libgiogconf.so
    /usr/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
    ——–

    This very library IS in /usr/lib32/…. But amazonmp3 is looking in /usr/lib/….

  1. Did you include the following?

    $ sudo getlibs -l libgiogconf.so

    And the original command:

    $ sudo getlibs /usr/bin/amazonmp3

    • Wes Morriston
    • July 23rd, 2009

    Yes, I’ve done both of those things. I have this installed:

    /usr/lib32/gio/modules/libgiogconf.so

    I still think the problem isn’t absent libraries, but the fact that amazonmp3 is looking for them in the wrong place.

    I don’t myself know enough about how ubuntu 9.04 works. I used to be that the value of $LD_LIBRARY_PATH told programs where to look for libraries. But this doesn’t seems normally to be set to anything in the environment. As I said I tried manually setting it to “/usr/lib32″, right before running amazonmp3. But that made no difference.

    • You shouldn’t have to change environment variables as getlibs sorts out the dependencies for 32-bit and 64-bit applications. The last error message you posted means that you only have the 64-bit library available.

      Try purging amazonmp3.deb and starting over. It works on my AMD system albeit I’m running a few 32-bit applications so may already have already resolved a dependency.

      Also, check out http://ubuntuforums.org/showthread.php?t=474790 for other getlib options.

    • David
    • July 24th, 2009

    Just done this on a fresh install so see my notes below

    There is a script called getlibs that’s designed to help you get around this problem: http://ubuntuforums.org/showthread.php?t=474790

    Download and install getlibs

    The 32-bit instructions above have to be modified like this:
    Code:
    sudo apt-get install libboost-signals1.34.1 libboost-iostreams1.34.1
    sudo dpkg -i –force-all amazonmp3.deb
    which amazonmp3
    sudo getlibs /usr/bin/amazonmp3
    apt-get install lib32nss-mdns
    amazonmp3

    • Thanks for your post. Whilst I’d previously installed lib32nss-mdns I didn’t need libboost-signals and libboostiostreams to run amazonmp3 successfully (not sure why you would the need Boost C++ libraries.)

    • Wes Morriston
    • July 25th, 2009

    Well, I did absolutely everything that’s been suggested. amazonmp3 is still looking for those libraries in /usr/lib/… I still get the following error messages.
    —-
    Gtk-Message: Failed to load module “canberra-gtk-module”: /usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so: wrong ELF class: ELFCLASS64
    /usr/lib/gio/modules/libgiogconf.so: wrong ELF class: ELFCLASS64
    Failed to load module: /usr/lib/gio/modules/libgiogconf.so
    /usr/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
    Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so
    /usr/lib/gio/modules/libgioremote-volume-monitor.so: wrong ELF class: ELFCLASS64
    Failed to load module: /usr/lib/gio/modules/libgioremote-volume-monitor.so
    ————-

    Maybe the fact that I’m running a 64-bit Intel machine is the relevant difference?

    • Guess what? When I run amazonmp3 from the command line I get:

      Gtk-Message: Failed to load module "canberra-gtk-module": /usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so: wrong ELF class: ELFCLASS64
      /usr/lib/gio/modules/libgioremote-volume-monitor.so: wrong ELF class: ELFCLASS64
      Failed to load module: /usr/lib/gio/modules/libgioremote-volume-monitor.so
      /usr/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
      Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so
      /usr/lib/gio/modules/libgiogconf.so: wrong ELF class: ELFCLASS64
      Failed to load module: /usr/lib/gio/modules/libgiogconf.so

      However, it runs and it works! I’ll dig a little deeper when I get a spare moment.

    • Wes Morriston
    • July 25th, 2009

    Guess what? You’re absolutely right. I just tried it again, and it worked. All the extra stuff you had me do must have accomplished something. Before I talked to you I had only forced installation of amazonmp3.deb and run getlibs. That wasn’t enough. Nothing would download.

    I still wonder why it seems to be looking for some libraries in /usr/lib/…

    • Mason
    • August 15th, 2009

    Thanks, worked great for me once I installed getlibs. A few other nice things – when you try to download an album, Firefox will ask you what app to open it with. You can point it to /usr/bin/amazonmp3 and tell it to always use it to get the downloads to start automatically. In my install, it writes the files to ~/Music/Amazon MP3, and Rhythmbox even picks them up automatically if you have it configured to place music files in ~/Music and watch for new files. So it should be one click from Amazon to Rhythmbox.

    • Willem
    • October 26th, 2009

    I had the same problem on jaunty with amazonmp3 not being able to connect. This worked (I did not look into how it worked):

    sudo aptitude install lib32nss-mdns

    From earlycj5. Thanks, dude(tte)! http://earlycj5.wordpress.com/2009/01/17/amazon-mp3-downloader-ubuntu-64-bit/

  1. No trackbacks yet.