工作目录:
mkdir ~/software/samba
cd ~/software/samba
【编译安装nettle-3.10.2】
bash
wget https://ftp.gnu.org/gnu/nettle/nettle-3.10.2.tar.gz --no-check-certificate
tar xf nettle-3.10.2.tar.gz
cd nettle-3.10.2
./configure --enable-mini-gmp
make
make install
ldconfig
cd ..
【编译安装gmp-6.3.0】
bash
wget https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz --no-check-certificate
tar xf gmp-6.3.0.tar.xz
cd gmp-6.3.0
./configure
make
make install
ldconfig
cd ..
【编译安装libtasn1-4.20.0】
bash
wget https://ftp.gnu.org/pub/gnu/libtasn1/libtasn1-4.20.0.tar.gz --no-check-certificate
tar xf libtasn1-4.20.0.tar.gz
cd libtasn1-4.20.0
./configure
make
make install
ldconfig
cd ..
【编译安装libffi-3.5.1】
bash
wget https://github.com/libffi/libffi/releases/download/v3.5.1/libffi-3.5.1.tar.gz --no-check-certificate
tar xf libffi-3.5.1.tar.gz
cd libffi-3.5.1
./configure
make
make install
ldconfig
cd ..
【编译安装p11-kit-0.25.5】
bash
wget https://github.com/p11-glue/p11-kit/releases/download/0.25.5/p11-kit-0.25.5.tar.xz --no-check-certificate
tar xf p11-kit-0.25.5.tar.xz
cd p11-kit-0.25.5
./configure --without-trust-paths
swapon /root/swapfile
make
make install
swapoff /root/swapfile
ldconfig
cd ..
【编译安装texinfo-7.2】
(里面有makeinfo命令)
bash
wget https://ftp.gnu.org/pub/gnu/texinfo/texinfo-7.2.tar.gz --no-check-certificate
tar xf texinfo-7.2.tar.gz
cd texinfo-7.2
./configure
make
make install
ldconfig
cd ..
【编译安装gnutls-3.8.10】
bash
wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.10.tar.xz --no-check-certificate
tar xf gnutls-3.8.10.tar.xz
cd gnutls-3.8.10
./configure --with-included-unistring
swapon /root/swapfile
make
make install
swapoff /root/swapfile
ldconfig
cd ..
【编译安装libgpg-error-1.55】
bash
wget https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.55.tar.gz --no-check-certificate
tar xf libgpg-error-1.55.tar.gz
cd libgpg-error-1.55
./configure
make
make install
ldconfig
cd ..
【编译安装libassuan-3.0.2】
bash
wget https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-3.0.2.tar.bz2 --no-check-certificate
tar xf libassuan-3.0.2.tar.bz2
cd libassuan-3.0.2
./configure
make
make install
ldconfig
cd ..
【编译安装libgcrypt-1.11.1】
bash
wget https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.11.1.tar.bz2 --no-check-certificate
tar xf libgcrypt-1.11.1.tar.bz2
cd libgcrypt-1.11.1
./configure
make
make install
ldconfig
cd ..
【编译安装libksba-1.6.7】
bash
wget https://www.gnupg.org/ftp/gcrypt/libksba/libksba-1.6.7.tar.bz2 --no-check-certificate
tar xf libksba-1.6.7.tar.bz2
cd libksba-1.6.7
./configure
make
make install
ldconfig
cd ..
【编译安装npth-1.8】
bash
wget https://www.gnupg.org/ftp/gcrypt/npth/npth-1.8.tar.bz2 --no-check-certificate
tar xf npth-1.8.tar.bz2
cd npth-1.8
./configure
make
make install
ldconfig
cd ..
【编译安装gnupg-2.4.8】
bash
wget https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.4.8.tar.bz2 --no-check-certificate
tar xf gnupg-2.4.8.tar.bz2
cd gnupg-2.4.8
./configure
make
make install
ldconfig
cd ..
【编译安装gpgme-2.0.0】
bash
wget https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-2.0.0.tar.bz2 --no-check-certificate
tar xf gpgme-2.0.0.tar.bz2
cd gpgme-2.0.0
./configure
make
make install
ldconfig
cd ..
【下载和安装Parse-Yapp-1.21】
(samba服务器要用到里面的Parse::Yapp::Driver)
bash
wget https://cpan.metacpan.org/authors/id/W/WB/WBRASWELL/Parse-Yapp-1.21.tar.gz --no-check-certificate
tar xf Parse-Yapp-1.21.tar.gz
cd Parse-Yapp-1.21
perl Makefile.PL
make
make install
cd ..
提示:在板子上编译安装perl命令(perl-5.40.2软件包)的方法见https://blog.csdn.net/ZLK1214/article/details/149077086。
【编译安装jansson-2.14.1】
bash
wget https://github.com/akheron/jansson/releases/download/v2.14.1/jansson-2.14.1.tar.gz --no-check-certificate
tar xf jansson-2.14.1.tar.gz
cd jansson-2.14.1
./configure
make
make install
ldconfig
cd ..
【编译安装libarchive-3.8.1】
bash
wget https://libarchive.org/downloads/libarchive-3.8.1.tar.gz --no-check-certificate
tar xf libarchive-3.8.1.tar.gz
cd libarchive-3.8.1
./configure
make
make install
ldconfig
cd ..
【编译安装attr-2.5.2】
bash
wget http://mirror.accum.se/mirror/gnu.org/savannah/attr/attr-2.5.2.tar.gz --no-check-certificate
tar xf attr-2.5.2.tar.gz
cd attr-2.5.2
./configure
make
make install
ldconfig
cd ..
【编译安装acl-2.3.2】
bash
wget http://mirror.accum.se/mirror/gnu.org/savannah/acl/acl-2.3.2.tar.gz --no-check-certificate
tar xf acl-2.3.2.tar.gz
cd acl-2.3.2
./configure
make
make install
ldconfig
cd ..
【编译安装Linux-PAM-1.6.1】
(这是最后一版不需要meson的版本)
bash
wget https://github.com/linux-pam/linux-pam/releases/download/v1.6.1/Linux-PAM-1.6.1.tar.xz --no-check-certificate
tar xf Linux-PAM-1.6.1.tar.xz
cd Linux-PAM-1.6.1
./configure
make
make install
ldconfig
cd ..
【编译安装autoconf-archive-2024.10.16】
(编译dbus-1.15.8才需要这个,如果选择编译dbus-1.15.6版本就不需要这个)
bash
wget https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2024.10.16.tar.xz --no-check-certificate
tar xf autoconf-archive-2024.10.16.tar.xz
cd autoconf-archive-2024.10.16
./configure
make
make install
cd ..
【编译安装dbus-1.15.8】
(这是最后一版不需要meson的版本,但是需要autoconf和autoconf-archive。如果没装autoconf的话可以选择1.15.6版本)
bash
wget https://dbus.freedesktop.org/releases/dbus/dbus-1.15.8.tar.xz --no-check-certificate
tar xf dbus-1.15.8.tar.xz
cd dbus-1.15.8
autoreconf --install
./configure
make
make install
ldconfig
cd ..
【安装python3-markdown】
(关于python3的安装方法见https://blog.csdn.net/ZLK1214/article/details/149077324)
pip3 install markdown
【安装python3-dnspython】
pip3 install dnspython
【编译安装popt-1.19】
这是为了解决samba编译过程中,编译source4/torture/krb5/kdc-heimdal.c文件时找不到popt.h的问题(https://bugzilla.samba.org/show_bug.cgi?id=14751)。
bash
wget https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/popt-1.19.tar.gz --no-check-certificate
tar xf popt-1.19.tar.gz
cd popt-1.19
./configure
make
make install
ldconfig
cd ..
未安装popt库时编译samba的报错信息:
root@luckfox-rv1106 \~/software/samba/samba-4.22.3\]# make
PYTHONHASHSEED=1 WAF_MAKE=1 ./buildtools/bin/waf build
Waf: Entering directory \`/root/software/samba/samba-4.22.3/bin/default'
Selected embedded Heimdal build
\[3793/4455\] Compiling source4/torture/krb5/kdc-heimdal.c
In file included from ../../source4/torture/krb5/kdc-heimdal.c:29:
../../lib/cmdline/cmdline.h:22:10: fatal error: popt.h: No such file or directory
22 \| #include \