尝试使用this script构建简单的.deb软件包失败了:
dh_installexamples
dh_installman
dh_installcatalogs
dh_installcron
dh_installdebconf
dh_installemacsen
dh_installifupdown
dh_installinfo
dh_pysupport
dh_installinit
dh_installmenu
dh_installmime
dh_installmodules
dh_installlogcheck
dh_installlogrotate
dh_installpam
dh_installppp
dh_installudev
dh_installwm
dh_installxfonts
dh_bugfiles
dh_lintian
dh_gconf
dh_icons
dh_perl
# Skipping dh_usrlocal - empty override
dh_link
dh_compress
dh_fixperms
dh_strip
dh_makeshlibs
dh_shlibdeps
dpkg-shlibdeps: error: couldn't find library libmono-2.0.so.1 needed by debian/7digital-mono/usr/usr/bin/monodis (ELF format: 'elf64-x86-64'; RPATH: '').
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/7digital-mono.substvars debian/7digital-mono/usr/usr/bin/mono debian/7digital-mono/usr/usr/bin/mprof-report debian/7digital-mono/usr/usr/bin/mono-sgen debian/7digital-mono/usr/usr/bin/pedump debian/7digital-mono/usr/usr/bin/monograph debian/7digital-mono/usr/usr/bin/monodis debian/7digital-mono/usr/usr/lib/mono/4.5/mcs.exe.so debian/7digital-mono/usr/usr/lib/mono/4.5/mscorlib.dll.so debian/7digital-mono/usr/usr/lib/mono/2.0/mscorlib.dll.so debian/7digital-mono/usr/usr/lib/libMonoSupportW.so debian/7digital-mono/usr/usr/lib/libikvm-native.so debian/7digital-mono/usr/usr/lib/libmono-2.0.so.1.0.0 debian/7digital-mono/usr/usr/lib/libMonoPosixHelper.so debian/7digital-mono/usr/usr/lib/libmono-profiler-log.so.0.0.0 debian/7digital-mono/usr/usr/lib/libmono-profiler-cov.so.0.0.0 debian/7digital-mono/usr/usr/lib/libmono-profiler-aot.so.0.0.0 debian/7digital-mono/usr/usr/lib/libmonosgen-2.0.so.0.0.0 debian/7digital-mono/usr/usr/lib/libmono-profiler-iomap.so.0.0.0 returned exit code 2
make: *** [binary] Error 9
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
知道这意味着什么吗?
答案 0 :(得分:3)
这意味着找到(在构建过程中)debian/7digital-mono/usr/usr/bin/monodis
(可能最终为/usr/bin/monodis
)的二进制文件正在链接libmono-2.0.so.1
,但找不到此文件
我怀疑.so文件也是你的软件包的一部分(虽然你没有提供任何关于此的线索),所以它还没有安装在目标系统上。
我觉得最奇怪的是路径中usr
的双重出现,这可能表明问题所在:dpkg-shlibdeps(通过链接器)可能会查找.so文件包路径中的标准路径(例如usr/lib
)和(例如debian/7digital-mono/usr/lib
),但它不会查看debian/7digital-mono/usr/usr/lib
答案 1 :(得分:0)
相应地更改"debian/rules"
文件,以指明LD_LIBRARY
在规则文件中搜索"dh binary-arch"
并替换为
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):/usr/lib/i386-linux-gnu:/lib/i386-linux-gnu dh binary-arch
OR
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):/path-1-to-shared-library:/path-2-to-shared-library dh binary-arch
OR
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):/path-to-shared-library dh binary-arch