Using Monkey’s Audio (ape) files in Ubuntu

To work with monkey’s audio (ape) files you need the “mac” command line tool. This software isn’t available in the Ubuntu repositories so you will need to either compile mac yourself, or alternatively install it from a .deb file.

Installing mac from a .deb file

I’ve put a .deb file for the mac software here (this is for 386 systems). Use it to install mac when you do not want to compile from source. It was compiled on a Kubuntu 6.10 system (works fine with Kubuntu/ Ubuntu 7.04). Save the file by right-clicking on the link and choosing “Save target as” or “Save as”. To install, open a terminal window, navigate to the directory containing the downloaded file, then enter the following:

sudo dpkg -i mac-3.99-u4_b3-1_i386.deb

To confirm the install went ok type “mac” in the terminal window – you should get a listing of mac’s usage details.

[Note: RareWares provides monkey's audio software for Debian users.]

Compiling mac from the source code

You need to install the development tools required to compile a program from source:

sudo apt-get install build-essential

Note that “nasm” (a dependency of mac) must also be installed before attempting to compile mac:

sudo apt-get install nasm

Click here to download the latest version (3.99) of the mac source code from the author’s web page. (I’ve placed a copy of the source here for if the author’s site is down).

Open a terminal window and uncompress the source code, and navigate into the source directory:

tar -zxvf mac-3.99-u4-b5.tar.gz
cd mac-3.99-u4-b5

Configure, make and install the source:

./configure
make
sudo make install

Confirm the install went ok by typing “mac” in the terminal window (should get a listing of mac’s usage details).

31 Comments

  1. Posted September 2, 2007 at 7:11 pm | Permalink

    thanks for ape ubuntu guide, works great :)

  2. agis
    Posted October 31, 2007 at 10:33 am | Permalink

    aidanjm, thankyou from link

  3. gray
    Posted November 5, 2007 at 6:17 am | Permalink

    works in Ubuntu 7.10 too.
    Great.Thanks.

  4. knoodrake
    Posted February 23, 2008 at 10:59 pm | Permalink

    Works well in hardy (alpha4).
    Thanks.

  5. Nick
    Posted March 5, 2008 at 11:54 am | Permalink

    I downloaded the source, and it seems that the NASM dependency has been changed to YASM.

  6. Posted March 13, 2008 at 5:47 am | Permalink

    This is truly a magnificent post, I’ve googled it a thousand times and have it bookmarked.

    However, do you know whether there’s any hope for 64-bit users? Your guide worked perfectly when I was still running i386, but now that I’m on 64-bit, is all hope lost for me? The deb you posted of course won’t install…

  7. Thomas Vanderburg
    Posted April 22, 2008 at 3:06 pm | Permalink

    Enough monkey business. Finally I can listen to my music!!! Works great in Ubuntu 7.10

  8. Clayborne Arevalo
    Posted May 27, 2008 at 1:53 pm | Permalink

    If you’re looking for something available via apt-get and friends, there’s a Debian package called libjmac-java. But it appears to be dog-slow in decoding a 100MB .ape file. (At over an hour (and counting), it’s much, much slower than decoding a flac file of comparable size. Maybe it’s just the non-Sun Java(tm) interpreter I’m using? Is ape audio decoding really that slower?

    However, since it’s Java-based, jmac can conceivably run on any machine for which a Java virtual machine is available (which probably means all widely available desktop processors).

    Once the package is installed, the command to run the main decoder program is:

    java -jar /usr/share/java/jmac.jar

    Which produces the usage screen containing options for compressing, decompressing and verifying your .ape file.

  9. asm
    Posted May 31, 2008 at 3:55 am | Permalink

    I can’t compile it with Ubuntu 8.04! Plz help!
    I always have this:
    Prepare.cpp:4: warning: this decimal constant is unsigned only in ISO C90
    and this:
    Console.cpp:74: warning: ‘spOutputFilename.CSmartPtr::m_bArray’ may be used uninitialized in this function

  10. Arrgoss
    Posted June 21, 2008 at 9:25 pm | Permalink

    Hi, thanks for the guide!
    As Conor, I’d like to install it in a 64-bit machine. Any suggestion how to do it?

  11. Posted June 29, 2008 at 10:08 pm | Permalink

    and here’s one more request for 64bit systems…

  12. Posted July 11, 2008 at 2:33 pm | Permalink

    Those of you looking for 64-bit debs of libmac and monkeys-audio (for Hardy), look no further than this guy’s PPA.

    Pre-hardy, there’s always Morgoth

  13. 4ugeistr
    Posted August 16, 2008 at 9:16 pm | Permalink

    Thanks a lot!
    Can’t even believe it worked!

  14. logos34
    Posted August 28, 2008 at 8:58 am | Permalink

    heliologue,

    The only thing I see on the PPA page you mentioned is this:

    rxvt-unicode

    I installed it anyway but I still get an error at the very end of make install (can’t find libmac.so or something).

    Has anyone had any success compiling mac-3.99 source pkg on x64 ubuntu (or other distro)? I would really like to have native ape support

  15. chandra
    Posted September 4, 2008 at 4:27 pm | Permalink

    Shouldn’t the line in bold,

    cd mac-3.99-u4-b5.tar.gz

    above, really be

    cd mac-3.99-u4-b5

    Thanks for a wonderful post!

  16. Posted September 4, 2008 at 11:06 pm | Permalink

    thanks, chandra, I’ve fixed the command

  17. Posted September 21, 2008 at 1:27 pm | Permalink

    Installing Audacious is easier.

  18. Posted September 21, 2008 at 9:33 pm | Permalink

    true, it would be easier to use a player that is compatible with ape, rather than converting all your apes to flac or some other format. some of the best players though don’t have plug-ins for ape. for me, moving to flac has been a good decision.

  19. aT2NRUg0f
    Posted November 10, 2008 at 1:15 pm | Permalink

    source directory path with spaces results in errors :
    “/home/a b/mac-3.99-u4-b5″

  20. aT2NRUg0f
    Posted November 10, 2008 at 1:24 pm | Permalink

    when :
    Compiling mac from the source code

  21. grabur
    Posted January 15, 2009 at 11:00 am | Permalink

    I cheated, I already had wine on ubuntu, so just installed the windows version of monkey’s audio, decompressed the ape, and burnt in brasero. The lazy could burn and image, then recode from that.

    Check this site for other ways of doing things.

  22. Posted February 5, 2009 at 9:46 am | Permalink

    Hi, thank you very much for you manual for mac and cuetools.

    Now that I’m using a Kubuntu amd64 system, I’m also searching for a amd64 binary of mac for Debian/*ubuntu, if someone has one, please, share with us.

    Thanks.

  23. Pipps
    Posted March 3, 2009 at 7:14 am | Permalink

    A brilliant article. Worked perfectly. Thank you!

  24. User
    Posted March 3, 2009 at 2:58 pm | Permalink

    Hi, I found PPA with a binary of mac-3.99-u4-b5 for *Ubuntu Intrepid 64-bit!

    https://launchpad.net/~g-christ/+archive/ppa

  25. Posted April 30, 2009 at 4:59 am | Permalink

    MAC for Arch Linux: http://aur.archlinux.org/packages.php?ID=18034

  26. Bart
    Posted May 17, 2009 at 10:36 pm | Permalink

    Worked perfectly on Ubuntu 9.04!

  27. chandra
    Posted May 19, 2009 at 12:42 am | Permalink

    Thanks, User for pointing out the 64-bit repo at https://launchpad.net/~g-christ/+archive/ppa

    Since I am using Jaunty, and the pre-built package is for Intrepid, this is what I did, in case it helps someone else:

    1. Add the line

    deb-src http://ppa.launchpad.net/g-christ/ppa/ubuntu intrepid main

    to /etc/apt/sources.list

    2. Add the GPG key of the repo following instructions onsite so:

    gpg –recv-keys FB34808D7ED779F6
    gpg –export –armor FB34808D7ED779F6 | sudo apt-key add -

    3. apt-get update

    4. Use prevu (assumed installed) to build a Jaunty package from Intrepid source so:

    cd /tmp
    apt-get source mac
    cd mac-3.99-u4-b5
    sudo prevu-update
    prevu

    5. On successful build of package,

    sudo apt-get update && sudo apt-get install mac

    6. Answer yes to any questions and complete installation.

  28. Posted June 6, 2009 at 9:14 pm | Permalink

    Thank You very much! I have a lot of .ape in my Music archive and this guide is really useful. Greetings from Poland!

  29. danotch
    Posted August 13, 2009 at 8:29 am | Permalink

    Works great in 9.04. Learned a lot here today!

  30. Posted September 4, 2009 at 12:57 pm | Permalink

    Excellent site, keep up the good work

  31. Miroslav
    Posted November 6, 2009 at 10:58 pm | Permalink

    I was able to download 64-bit mac.deb package for my ubuntu 9.10 karmic using the link mentioned above https://launchpad.net/~g-christ/+archive/ppa. Thanks a lot!!!


2 Trackbacks/Pingbacks

  1. [...] Monkey’s Audio (.APE) tan solo tendréis que instalar el paquete (.deb) que se encuentra en ésta página, es decir, éste paquete, y el SoundKonverter lo detectará. Para instalarlo simplemente se [...]

  2. [...] Source: http://aidanjm.wordpress.com/2007/01/26/using-monkeys-audio-ape-files-in-ubuntu/ [...]

Post a Comment

Your email is never published nor shared.