ubuntu 16.04 编译安装 amule (开启GUI)
安装依赖
$ sudo apt-get install libcrypto++-utils binutils-dev libcrypto++-dev libgtk2.0-dev libgeoip-dev zlib1g-dev libupnp-dev libboost-all-dev libwxbase3.0-dev libwxgtk3.0-dev build-essential autoconf automake gettext -y
下载libgd 编译安装
$ curl -L -O https://github.com/libgd/libgd/releases/download/gd-2.2.5/libgd-2.2.5.tar.gz $ tar -zxf libgd-2.2.5.tar.gz && cd libgd-2.2.5 $ ./configure && make $ sudo make install
下载wxWidgets 编译安装
$ curl -L -O https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.4/wxWidgets-3.0.4.tar.bz2 $ tar -jxf wxWidgets-3.0.4.tar.bz2 && cd wxWidgets-3.0.4 ./configure --with-gtk --without-libtiff --without-subdirs --enable-unicode --enable-optimise $ make
这里wxWidgets 必须使用 3.0,不能使用 3.0 以上,比如 3.1,会报错
extern/wxWidgets/listctrl.cpp:4864:23: error: ‘OnScroll’ is not a member of ‘wxScrolledWindow’
wxWidgets 执行make就可以,不必make install
编译amule
先在这里下载 amule
下载地址: https://sourceforge.net/projects/amule/files/aMule/
我选择当前的最新版本:2.3.2
$ curl -L https://sourceforge.net/projects/amule/files/aMule/2.3.2/aMule-2.3.2.tar.bz2/download > aMule-2.3.2.tar.bz2 $ tar -jxf aMule-2.3.2.tar.bz2 && cd aMule-2.3.2
预编译
$ sudo ./configure --prefix=/usr/local/amule/ \ --enable-debug \ --enable-dependency-tracking \ --enable-amule-daemon \ --enable-amulecmd \ --enable-webserver \ --enable-amule-gui \ --enable-cas \ --enable-wxcas \ --enable-profile \ --enable-optimize \ --enable-static-boost \ --enable-mmap \ --enable-upnp \ --enable-geoip \ --enable-nls \ --enable-alcc \ --enable-alc \ --with-boost \ --with-denoise-level=3 \ --with-wxdir=/path/wxWidgets-3.0.4 \ LIBS=-lX11
这里 --with-wxdir 填源码地址
sudo make sudo make install
本次编译安装是开启GUI的,所以请装好桌面(没安装桌面,肯定是编译不过的),本次测试安装桌面为gnome。
这里推荐一个不带GUI的Docker镜像(基于alpine的,体积比较小)
https://hub.docker.com/r/b1nitp7iw/amule/
dockerfile: https://github.com/yulahuyed/amule/blob/master/Dockerfile
参考链接
http://wiki.amule.org/wiki/HowTo_Compile_In_Ubuntu
https://github.com/amule-project/amule/issues/55
http://forum.amule.org/index.php?topic=21696.0