Gentoo Wiki


Warning: This article replaces main tree packages with alternative versions with no explanation as to why.

aMule is an eMule-like client for the eD2k and Kademlia networks, supporting multiple platforms.

It is free and it's sourcecode released under the GPL.

aMule is built upon the wxWidgets (formely wxWindows) toolkit, which enables it to support multiple platforms.

The official build o aMule on Gentoo is 2.1.3 with wxGTK- That version of wxGTK has some bugs. The most notted for aMule 2.1.3 users' is the unexpected closing of the application when search tabs are selected before the search has ended.

To overcome that problem you can use aMule 2.2.0 and wxGTK

aMule 2.2.0 still under development, so it's stability may vary from one buld to other. wxGTK is not under portage tree, so must be installed as third party ebuild.



- A local portage overlay. There is a HOWTO to help you create your local overlay, if you already don't have one. This document assumes that your local overlay is at /usr/local/portage/.

- Ebuild for aMule 2.2.0 , ebuild to be compiled with gtk2+ and remote control enabled.

- Ebuild for eselect-wxwidgets-0.7-r1

- Eclass for wxwidgets.eclass

- Ebuild for wxGTK-, should be compiled with unicode and X flags.

# echo "x11-libs/wxGTK unicode X" >> /etc/portage/package.use

If you don't use the X flag and try to emerge amule with the USE="gtk" you get an error message during the emerge.

Emerge wxGTK

In order to emerge aMule, wxGTK That version of wxGTK needs wxwidgets.eclass and wxwidgets-0.7-r1.

wxwidgets-0.7-r1 can't be used with wxGTK versions lower than wxGTK- If do you have an older wxGTK version installed a block warning appears and you can't procede with the installation. You must remove the older version first. Eg.

# emerge --unmerge wxGTK-2.6.3

Warning: portage does not check if the package is needed by other applications! It only will warn you if the package removal breaks the whole system! Be careful with that axe, Eugene!

Create the initial directory structure for the eclass, and download it:

# mkdir -p /usr/local/portage/eclass
# cd /usr/local/portage/eclass
# wget -O wxwidgets.eclass

Create the initial directory structure for the eselect-wxwidgets-0.7-r1, and download it:

# mkdir -p /usr/local/portage/app-admin/eselect-wxwidgets/
# cd /usr/local/portage/app-admin/eselect-wxwidgets/
# wget -O eselect-wxwidgets-0.7-r1.ebuild*checkout*/gentoo-x86/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.7-r1.ebuild?rev=1.7

Check to see if additional files are needed:

# grep FILESDIR /usr/local/app-admin/eselect-wxwidgets/*ebuild
        newins "${FILESDIR}"/wxwidgets.eselect-${PV} wxwidgets.eselect \
        doins "${FILESDIR}"/wxwin.m4
        newbin "${FILESDIR}"/wx-config-${PV} wx-config
        newbin "${FILESDIR}"/wxrc-${PV} wxrc

Check to see if the additional files have a source for download defined:

# grep SRC_URI /usr/local/app-admin/eselect-wxwidgets/*ebuild

A problem here! Additional files are needed but a source is not defined! To fix this you can search for an appropriate source and use it to fill the SRC_URI or you can find the source files and download them on a files directory. I prefer that option.

So lets create the files directory and download the needed files. A quick search for the file names hopefully will return some repository, in that case it was

# mkdir -p /usr/local/portage/app-admin/eselect-wxwidgets/files
# cd /usr/local/portage/app-admin/eselect-wxwidgets/files
# wget -O wx-config-0.7
# wget -O wxrc-0.7
# wget -O wxwidgets.eselect-0.7
# wget -O wxwidgets.eselect-0.8
# wget -O wxwin.m4

All the files have been found, so the ebuild can have the digest made:

# ebuild eselect-wxwidgets-0.7-r1.ebuild digest

Emerge aMule

In order to emerge amule with the webserver and gtk2 the flags remote and gtk2 are needed.

If you also want also support for external statistics, you must add also the flag stats, not enabled by default.

If you previously installed wxGTK the with use-flag gtk2 and the use-flag unicode, you can choose which version amule should be used:

for the gtk2 version:

# echo "/net-p2p/amule remote stats -unicode" >> /etc/portage/package.use
# emerge amule -v --pretend

for the gtk2+unicode version:

# echo "/net-p2p/amule remote stats unicode" >> /etc/portage/package.use
# emerge amule -v --pretend

if wxGTK was compiled without the use-flag unicode you should use:

# echo "/net-p2p/amule remote stats -unicode" >> /etc/portage/package.use
# emerge amule -v --pretend

If everything is ok, remove --pretend and compile.

amuled Daemon

aMule has sepparate programs, one GUI application (amule) and a CLI based application (amulecmd). To use amulecmd or the remote control option the amuled daemon amuled must be running. Type at the command prompt

# amuled -of

To test the daemon use the CLI interface

# amulecmd

That document was put togheter due some difficulties that I experienced trying to run amule. It is a work in progress, but I hope it help someone.

Retrieved from ""

Last modified: Thu, 04 Sep 2008 00:35:00 +0000 Hits: 2,853