HowTo Compile In Debian-fr
NOTE: Ce tutoriel foncionnera aussi sur Ubuntu Linux.
Contents
- 1 Êtes-vous sûrs de vouloir compiler vous-mêmes ?
- 2 Compiler aMule sur Debian 3.0 (Woody)
- 3 The easiest: Preparing the system
- 4 The fastest: Installing the necessary packages
- 5 The hardest: Compiling aMule
- 6 Meeting satisfaction: Installing aMule!
- 7 The end: Final checks
- 8 You're done...
- 9 Final notes
Êtes-vous sûrs de vouloir compiler vous-mêmes ?
Sinon, (ce qui est le plus courant) décidez si vous voulez la version stable d'aMule ou la version SVN d'aMule.
Version stable d'aMule
Ces paquets sont uniquement pour la version Sarge de Debian (3.1) !
Pour installer la dernière version d'aMule en utilisant les debs, rien de plus simple, il vous suffit d'ajouter la ligne suivante au fichier /etc/apt/sources.list :
deb http://amule-debian.dyndns.org/ debian/
Puis de lancer apt-get update && apt-get install amule
Paquets de ce repository:
- amule
- amule-daemon
- amule-remote-gui
- amule-gui-utils (alc, wxcas)
- amule-console-utils (amuleweb, alcc, cas)
- amule-utils (metapackage pour amule-gui-utils et amule-console-utils)
NOTES :
- Si aMule termine avec des erreurs signalant l'impossibilité d'ouvrir libbfd-2.15.so cela veut probablement dire que vous n'êtes PAS sur Debian Sarge. N'essayez pas de créer des liens symboliques ou de trouver des parades : cela pourrait facilement bloquer tout votre système.
- http://dude.gemil.de (l'ancien lien) n'est plus conseillé. http://amule-debian.dyndns.org est (pour l'instant) juste une redirection, mais cela pourrait changer à l'avenir (si le repository devait être déplacé à cause des limitations du traffic).
Version SVN d'aMule
Ces paquets sont pour la version testing de Debian (Etch) seulement !
Pour récupérer la dernière version SVN d'aMule en debs, ajoutez la ligne suivante au fichier /etc/apt/sources.list :
deb http://www.vollstreckernet.de/debian/ testing amule
Les paquets sont signés par GPG, il faut donc utiliser les commandes suivantes :
gpg --keyserver wwwkeys.eu.pgp.net --recv 50D0AE60 gpg -a --export 50D0AE60 > /tmp/key apt-key add /tmp/key (nécessite les droits d'administration)
Puis lancez apt-get update && apt-get install amule
Vous pouvez également jeter un coup d'oeil aux autres outils aMule disponibles :
- amule
- amule-utils
- amule-utils-gui
- amule-ed2k
- amule-cas
- amule-wxcas
- amule-xas
- amule-common
- amule-theme-default
- amuleweb
- amule-remote-gui
- amule-daemon
- amule-alc
- amule-alcc
- amule-cmd
- 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-ch
- amule-i18n-it
- 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-zh-cn
- amule-i18n-zh-tw
Par exemple, si vous pensez que l'interface Web d'aMule déchire et que vous voulez l'avoir également, lancez la commande suivante :
Pour aMule SVN: apt-get install amuleweb
Pour la version stable d'aMule : apt-get install amule-console-utils
Si vous tenez toujours à compiler aMule au lieu d'instaler simplement les exécutables, continuez la lecture...
Compiler aMule sur Debian 3.0 (Woody)
Important : Il faut bien avoir en tête que ce tutoriel a été fait en pensant à aMule 2.0.0 ou plus récent sur Debian 3.0 (Woody/Sarge/Sid).
Ce tutoriel se fonde sur l'utilisation de l'outil d'installation de paquet apt-get, ce qui veut dire que vous allez avoir besion d'avoir les droits d'administration (root). Par ailleurs, apt-get nécessite un système installé avec des dépendances de paquets parfaîtes. Si vous utilisez habituellement apt-get pour installer n'importe quelle application vous pouvez sauter cette section et passer directement à la suite. Si vous utilisez rarement apt-get mais plutôt apt-get il vous faut :
A) (Recommendé) Résoudre tous les problèmes de dépendances de paquets sur votre système. Pour cela il faut regarder ce que donne la commande "dpkg -C"
et installer / effeacer / mettre à jour les différents paquets qu'elle mentionne en fonction de ce qui est requis. Cette option est recommendée non seulement parcequ'elle permet de s'assurer que la compilation d'aMule se déroulera correctement, mais cela contribuera à stabiliser votre système et par la suite vous pourrez alors utiliser apt-get qui permet des installations plus faciles mais aussi des mises à jours de votre systèmes grandement facilitées.
B) Forcer apt-get à ignorer les problèmes de dépendences en utilisant l'option -f ou --fix-broken (une seule des deux suffit puisqu'il s'agit de la même option, cela donne par exemple "apt-get install -f ..."
). Cette option peut provoquer une installation corrompue ou un problème sur certains paquets qui pourrait empêcher les applications de fonctionner. Asussi n'oublier pas qu'utiliser cette option utilisée dans un système qui a des problèmes de dépendances pourrait tout coincer si le paquet installé est un paquet de base de la distribution (bien que ce ne soit pas le cas ici).
C) Suivre les instructions, mais au lieu d'utiliser "apt-get install foo"
, lancer "dpkg -i foo"
où foo est le paquet à installer. Souvenez vous que les paquets à installer doivent déjà être sur le systèmes lorsqu'ils sont installés via dpkg. N'oubliez pas non plus de télécharger les paquets "Depends" (dont dépendent les paquets à installer) puisqu'il y aura sûrement besoin de ces paquets pour accomplir la compilation. Dans tous les cas, il ne faut pas utiliser les options suivantes de dpkg : --force-all --force-depends-version --force-depends --force-conflicts
Si vous installez habituellement les applications depuis leurs codes source, lisez "aMule compilation / installation HowTo" de deltaHF car votre système pourrait ne pas satisfaire les dépendances du paquet aMule de debian même si la commande "dpkg -C"
ne montre aucune erreur.
The easiest: Preparing the system
Once you decided to use apt-get, you must make sure you'll be downloading the latest versions of the packages (aMule team has discovered bugs in some deb packages that would make aMule impossible to compile on Debian without compiling some other libraries too. This bugs have been mostly fixed in those affected debian packages, so it is very important to be sure to have the packages up to date). This is done by issuing:
apt-get update && apt-get dist-upgrade
Note 1: You must be root user to do this. Log in as root or "su"
or use "sudo"
. NB: "sudo"
must be specified on both apt-get commands, that is:
sudo apt-get update && sudo apt-get dist-upgrade
"sudo"
is not a base command, so it may not be installed on your system, although it most probably will. Be aware that following this HowTo entirely as root may bring some problems later such as being unable to delete certain files as a normal user, so please only use root priviledges when necessary.
Note 2: Woody users (that is, people stuck in the stable Debian 3.0 branch) will be updated to Sarge doing apt-get dist-upgrade.
Note 3: Sid users (that is, people holding the cutting-edge unstable Debian 3.0 branch) could suffer problems from packages not completely implemented or with broken dependencies (both are normal issues in the unstable branch). It is very important to keep this in mind since a compiler (g++) will be installed so it could also be broken and, with it, most applications compiled with it (once upgraded, of course). If a package was broken, to downgrade you can use the --force-downgrade switch with dpkg.
If for whatever reason you think this is too much of a complication, you can just wait a few days until the aMule binary version comes out for your architecture (that is, a .deb file).
The fastest: Installing the necessary packages
Remember you need to be root to install applications using apt-get, since apt-get installs system-wide applications. So, log in as root, use "su" or add "sudo" before every command shown here.
The following are the packages which must be installed:
1) Install the latest stable g++ compiler and the C++ Standard Library
apt-get install g++
the required libraries for compiling aMule (wxbase is not really a requiered packet to compile aMule but, unless you know what you're doing, be sure you install it. I won't show in this this guide how to force aMule's compilation without wxbase):
apt-get install libwxbase2.4-dev libcurl3-dev libgtk1.2-dev libwxgtk2.4-dev
Alternatively you can use apt-get build-dep amule
to get all the required depencies for compilation. Anyway, this last method is not sure to work, since it will depend on the latest version on the Debian repository and later versions or SVN versions might have different dependencies.
And the required utilities for compiling aMule:
apt-get install gettext make
Note 5: This can all be done in a single command line, which might be more handy for users using "sudo"
to gain root priviledges:
apt-get install g++ libwxbase2.4-dev libcurl3-dev libgtk1.2-dev libwxgtk2.4-dev gettext make
Note 6: From aMule 2.0.0-rc1 to aMule 2.0.0-rc5 (inclusive) the package libcrypto++-dev was necessary for compiling aMule, so if you are compiling any of such versions, apt-get libcrypto++-dev too.
Also, you might be interested in installing libgd2-noxpm-dev if you plan to compile CAS. It is not a required library for compiling CAS, this library is only used by CAS for creating images (since v2.0.0-rc3) on the current aMule status (by running cas -o
). If you plan to use this feature of CAS, you need to install LibGD2. Anyway, CAS will compile perfectly well even if LibGD2 isn't installed, since it detects, on compilation time, if this library is installed.
2) Download the latest released aMule source code from here (or look here for an up-to-date link).
Note 7: From now on, I will suppose we are installing aMule 2.0.0-rc3
3) Fix Crypto++ Library 5.1 if using it.
From aMule 2.0.0-rc1 to a aMule 2.0.0-rc5 (inclusive) this library is required because aMule is now supporting SecureIdent (remember, since aMule 2.0.0-rc6, libcrypto++ is optional and not needed by default), but the Crypto++ Debian package has had lots of compiling bugs and still has one (although the rest have been fixed after aMule team's reports). Remember you should have update and dist-upgraded apt-get before installing any Debian package in this HowTo, otherwise, you could be installing (or already have installed) a buggy Crypto++ package and this fix will not suit your needs. To fix the latest crypto++ Debian package only a symbolic link is needed:
ln -s /usr/include/crypto++/cryptopp_config.h /usr/include/crypto++/config.h
If you still can't compile crypto++, try compiling it after running the following command:
ln -s /usr/include/crypto++ /usr/include/cryptopp
Note 8: Since this link needs write permissions in /usr/lib, super-user (root) priviledges are needed. Again, this can be done easily with "su"
or "sudo"
.
Using wxWidgets 2.6
Etch and Sid users can use wxWidgets 2.6 instead of wxWidgets 2.4 (Woody and Sarge users, forget about it. Go straight to the next chapter of this article).
To use wxWidgets 2.6 instead of 2.4, just replace in all the above commands the terms libwxbase2.4-dev and libwxgtk2.4-dev with libwxbase2.6-dev and libwxgtk2.6-dev respectively.
Whether or not you should use wx 2.6 insetad of wx 2.4 is up to you. It has both advantages and disadvantages. Anyway, in most cases, you will be grateful to use wx 2.6, so it is recommended.
The hardest: Compiling aMule
4) Extract the sources. The following will create a folder on your user's home directory where it will extract the sources with the -C switch into it (the following command understands that aMule's sources are on the current directory):
mkdir ~/aMule-compilation/ && tar xzfv aMule-2.0.0rc3.tar.gz -C ~/aMule-compilation/ && cd ~/aMule-compilation/
Note 9: Remember I'm supposing you are extracting aMule 2.0.0-rc3. Change the file name if it doesn't correspond to the actual packed source code filename.
5) Compile aMule! The following command will actually switch to the directory containing aMule 2.0.0rc3 and compile it:
cd ~/aMule-compilation/aMule-2.0.0rc3/ && ./configure && make
Note 10: Please take a look at the configure article.
Note 11: You should check the output of
./configure --help | more
to see if there is any configure switch which might be of your interest, such as --disable-debug --enable-optimise or --bindir=
Note 12: if you get an error message, while compiling, similar to: "In file included from /usr/include/wx/***:***, [...] /usr/include/wx/******:***: internal compiler error: Segmentation fault", then you most probably have problems with wxWidgets. Try with
apt-get install --reinstall wxwin2.4-headers libwxbase2.4 libwxgtk2.4-dev
which will reinstall wxWidgets and will most probably fix the compilation error.
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.