我正在编译samba-4.19.0
然后Debian12
将编译的内容移植到其他系统。一开始我想尽量编译成静态可执行文件,但是找不到对应的方法,只好使用动态库来编译。但是编译出来的bin
文件很多lib
,移植到其他系统上非常麻烦。不知道什么方法可以解决我的问题?
tar zxvf samba-4.19.0.tar.gz
cd samba-4.19.0/bootstrap/generated-dists/debian12
sudo ./bootstrap.sh
cd ../../../
./configure --disable-cups
--sbindir=/home/debian12/x86/samba/smb_install/sbin
--sysconfdir=/home/debian12/x86/samba/smb_install/etc
--mandir=/home/debian12/x86/samba/smb_install/man
--prefix=/home/debian12/x86/samba/smb_install
make -j 4
sudo make install
bin 和 lib:
debian12@gyz:~/x86/samba/smb_install$ ls
bin bind-dns etc include lib libexec private sbin share var
debian12@gyz:~/x86/samba/smb_install$ ls bin
cifsdd ldbadd ldbrename mdsearch nmblookup profiles regtree samba-tool smbcontrol smbspool smbtree tdbtool
dbwrap_tool ldbdel ldbsearch mvxattr ntlm_auth regdiff rpcclient sharesec smbcquotas smbstatus tdbbackup testparm
dumpmscat ldbedit locktest ndrdump oLschema2ldif regpatch samba-log-parser smbcacls smbget smbtar tdbdump wbinfo
gentest ldbmodify masktest net pdbedit regshell samba-regedit smbclient smbpasswd smbtorture tdbrestore winexe
debian12@gyz:~/x86/samba/smb_install$ ls lib
bind9 libndr-krb5pac.so.0 libsamba-errors.so.1.0.0 libsmbconf.so.0.0.1
gensec libndr-krb5pac.so.0.0.1 libsamba-hostconfig.so libsmbldap.so
idmap libndr-nbt.so libsamba-hostconfig.so.0 libsmbldap.so.2
krb5 libndr-nbt.so.0 libsamba-hostconfig.so.0.0.1 libsmbldap.so.2.1.0
ldb libndr-nbt.so.0.0.1 libsamba-passdb.so libtevent-util.so
libdcerpc-binding.so libndr.so libsamba-passdb.so.0 libtevent-util.so.0
libdcerpc-binding.so.0 libndr.so.3 libsamba-passdb.so.0.28.0 libtevent-util.so.0.0.1
libdcerpc-binding.so.0.0.1 libndr.so.3.0.1 libsamba-policy.cpython-311-x86-64-linux-gnu.so libwbclient.so
libdcerpc-samr.so libndr-standard.so libsamba-policy.cpython-311-x86-64-linux-gnu.so.0 libwbclient.so.0
libdcerpc-samr.so.0 libndr-standard.so.0 libsamba-policy.cpython-311-x86-64-linux-gnu.so.0.0.1 libwbclient.so.0.16
libdcerpc-samr.so.0.0.1 libndr-standard.so.0.0.1 libsamba-util.so nss_info
libdcerpc-server-core.so libnetapi.so libsamba-util.so.0 pkgconfig
libdcerpc-server-core.so.0 libnetapi.so.1 libsamba-util.so.0.0.1 private
libdcerpc-server-core.so.0.0.1 libnetapi.so.1.0.0 libsamdb.so process_model
libdcerpc-server.so libnss_winbind.so.2 libsamdb.so.0 python3.11
libdcerpc-server.so.0 libnss_wins.so.2 libsamdb.so.0.0.1 security
libdcerpc-server.so.0.0.1 libsamba-credentials.so libsmbclient.so service
libdcerpc.so libsamba-credentials.so.1 libsmbclient.so.0 vfs
libdcerpc.so.0 libsamba-credentials.so.1.0.0 libsmbclient.so.0.7.0
libdcerpc.so.0.0.1 libsamba-errors.so libsmbconf.so
libndr-krb5pac.so libsamba-errors.so.1 libsmbconf.so.0