HowTo Compile In Debian/Ubuntu

From AMule Project FAQ
Revision as of 14:08, 24 August 2007 by 84.171.81.40 (Talk)

Jump to: navigation, search
English | Español

NOTE: This howto will also work for Ubuntu Linux.

See also general Compilation Installation

Are you sure you want to compile?

If not, (which is pretty common) decide if you want the aMule stable release or the aMule CVS release.

aMule stable release

These packages are for Debian 3.1 Sarge only!

You can just install latest stable aMule version through debs adding the following lines into your /etc/apt/sources.list file:

deb http://amule-debian.dyndns.org/ debian/

Now run apt-get update && apt-get install amule

Packages in this repository:

  • amule
  • amule-daemon
  • amule-remote-gui
  • amule-gui-utils (alc, wxcas)
  • amule-console-utils (amuleweb, alcc, cas)
  • amule-utils (metapackage for amule-gui-utils and amule-console-utils)

NOTES:

  • If aMule exits with error message complaining about being unable to open libbfd-2.15.so this usually means you are NOT running Debian Sarge. Don't start making symlinks or doing other workarounds, they can quite easily bork your whole system.

aMule CVS release

You can also get the latest aMule CVS through debs adding the following line into your /etc/apt/sources.list file:

For Debian Testing (aka Lenny). In most cases this works for sid/unstable, too

deb http://www.vollstreckernet.de/debian/ testing amule
For Debian Stable (aka Etch)

deb http://www.vollstreckernet.de/debian/ stable amule

If you need a recent Version of wx (2.8 atm), just append " wx" to the lines above. Be carefull, between amule and wx is a space needed. If you only want wx binaries installed, replace amule with wx.

packages are GPG sighned, so follow this steps:

gpg --keyserver wwwkeys.eu.pgp.net --recv 50D0AE60
gpg -a --export 50D0AE60 > /tmp/key
apt-key add /tmp/key (requires superuser privileges)

Now run apt-get update && apt-get install amule

You might also want to take a look at the other available aMule utilities:

aMule CVS

  • amule
  • amule-alc
  • amule-alcc
  • amule-alcc-dbg
  • amule-alc-dbg
  • amule-cas
  • amule-cas-dbg
  • amule-cmd
  • amule-cmd-dbg
  • amule-common
  • amule-daemon
  • amule-daemon-dbg
  • amule-dbg
  • amule-ed2k
  • amule-ed2k-dbg
  • amule-i18n-ar
  • amule-i18n-bg
  • amule-i18n-ca
  • amule-i18n-da
  • amule-i18n-de
  • amule-i18n-en-gb
  • amule-i18n-en-us
  • amule-i18n-es
  • amule-i18n-es-mx
  • amule-i18n-et-ee
  • amule-i18n-eu
  • amule-i18n-fi
  • amule-i18n-fr
  • amule-i18n-gl
  • amule-i18n-hr
  • amule-i18n-hu
  • amule-i18n-it
  • amule-i18n-it-ch
  • amule-i18n-ko-kr
  • amule-i18n-nl
  • amule-i18n-pl
  • amule-i18n-pt-br
  • amule-i18n-pt-pt
  • amule-i18n-ru
  • amule-i18n-sl
  • amule-i18n-sv
  • amule-i18n-tr
  • amule-i18n-zh-cn
  • amule-i18n-zh-tw
  • amule-remote-gui
  • amule-remote-gui-dbg
  • amule-skin-gnome
  • amule-skin-kde4
  • amule-skin-tango
  • amule-skin-xfce
  • amule-theme-chicane
  • amule-theme-default
  • amule-theme-php-default
  • amule-utils
  • amule-utils-gui
  • amuleweb
  • amuleweb-dbg
  • amule-wxcas
  • amule-wxcas-dbg
  • amule-xas

For example, if you think aMule's Web interface rocks and you want to have it too, enter this line after the one above:

For aMule CVS: apt-get install amuleweb

For aMule stable: apt-get install amule-console-utils

If you still want to compile aMule instead of just installing a binary, keep reading...

Info: What aMule release needs what wxwidgets release?

  • Debian Etch includes aMule 2.1.3 and wxwidgets 2.6.3
  • aMule 2.1 needs wxwidgets 2.6. You cannot compile it with newer versions of wxwidgets.
  • aMule 2.2 needs wxwidgets 2.8. You cannot compile it with older versions of wxwidgets.

What developement packages do I need for compiling?

For compiling aMule-CVS and aMule 2.2.0 you need the following packages installed:

  • libglib2.0-dev
  • libgtk2.0-dev
  • zlib1g-dev
  • libwxgtk2.8-dev (if you compile wx by hand, this isn't needed. This package is atm only aviable for debian from Vollstreckers repository)
  • libgd2-xpm-dev
  • bison
  • flex
  • libreadline5-dev
  • libgeoip-dev
  • libupnp-dev

If you want to use the external crypto-librarie you need in addition:

  • libcrypto++-dev

Preparing: Compiling and installing wxwidgets

This algorithm works for all Debian flavours.

To compile aMule, You need to have a current version of wxWidgets installed. To achieve that: Uninstall every possibly previously installed wxwidgets stuff (see How to uninstall wxWidgets and Check if wx is installed twice) You need the following packages installed:

  • flex
  • bison
  • gettext
  • libgtk2.0-dev
  • python-dev (>= 2.4.3)
  • python-dbg
  • lib1g-dev
  • libjpeg62-dev
  • libpng12-dev
  • libtiff4-dev
  • libgl1-mesa-dev or libgl-dev
  • libglu1-mesa-dev or libglu-dev
  • libesd0-dev
  • libgnomeprintui2.2-dev
  • libgconf2-dev
  • libgstreamer0.10-dev
  • libgstreamer-plugins-base0.10-dev
  • python-central
  • bc
  1. Download current wxwidgets wxGTK stable release source code tar ball from http://www.wxwidgets.org/downloads/
  2. $ tar xvzf wxgtk-version.tar.gz
  3. $ cd wxGTK-version
  4. $ ./configure --prefix=/usr --with-gtk --enable-unicode --disable-compat24 --enable-optimise
  5. $ make
  6. # make install
  7. # ldconfig

$ = command executed with normal user account
# = command executed with root account

Compiling and installing aMule

Now that You have installed current wxGTK, go on to compile aMule:

  1. Install the needed packages mentioned in "What developement packages do I need for compiling?"
  2. Download aMule source code tar ball from http://www.amule.org (note: For compiling aMule 2.1.3 you'll need a patch aviable HERE
  3. $ tar xvjf aMule-version.tar.bz2
  4. $ cd aMule-version
  5. To have a look what features of aMule You can enable or disable: $ ./configure --help
  6. You should be right with $ ./configure --disable-debug --enable-optimize
  7. $ make
  8. # make install

$ = command executed with normal user account
# = command executed with root account

That's it! Now You can start aMule with command "amule".





Meeting satisfaction: Installing aMule!

8) What's left? Install aMule (remember you must be root, so log in as root or use "su" or "sudo"):

make install

Now you can remove the sources so you free up space in your hard disk by running:

rm -rf ~/aMule-compilation/

The end: Final checks

If you have sometime installed aMule from the Debian packages (no matter if the package came from http://gunnm.org/~soda ), you will have aMule binaries installed in /usr/bin. But "make install" installs binnaries in /usr/local/bin (unless --prefix= is set in configure). This leads us to the point that when typing "amule" anyone of the two installed aMule versions might be invoked (which one is executed will depend on the $PATH environment variable. You can check it by typing "type amule"). The walk around is very easy: remove the aMule installed through Debian package. You can do this with the command "apt-get remove amule" (do not use "apt-get remove --purge" or you might loose your aMule settings) or with "dpkg --remove amule" (again, never ever use "dpkg --purge" or you might loose your aMule settings). apt-get will remove aMule-utils if you have them installed (only available as a separate package in Sid, in Sarge and Woody aMule utils are included in the base aMule package) while dpkg will leave aMule-utils installed on the system (which, in general, is a bad idea).

Also, if you installed xmule sometime or you are planing to install it, have in mind that the ed2k command exists both in aMule and xMule. You might want to run `type ed2k` to see which ed2k command will be executed and rename the other so you make sure it's never executed by mistake.

You're done...

That's it! Your own compiled aMule is installed on your system and ready to go.

To run aMule, just type "amule". You can check if everything worked by typing "amule -v" and check if the displayed version corresponds with the one you were compiling/installing.

If this HowTo didn't help, you have a rare problem on your system ;-) Take a look at http://www.amule.org (aMule Forums at http://forum.amule.org ) or visit us in #amule on irc.freenode.net and (don't doubt) we'll try to do our best to help you.

Final notes

If you are in one of those rare cases when you wish to compile aMule statically, install also libtiff4-dev (through apt-get install libtiff4-dev). Anyway, this is NOT recommended and, in fact, will probably not do any better or even, not work at all.