2

尝试使用此脚本构建简单的 .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

知道这意味着什么吗?

4

2 回答 2

3

这意味着(在构建过程中)找到的二进制文件debian/7digital-mono/usr/usr/bin/monodis(并且可能最终会成为/usr/bin/monodis)正在链接,libmono-2.0.so.1但找不到该文件。

我怀疑 .so 文件也是您的软件包的一部分(尽管您对此没有任何线索),因此它尚未安装在目标系统上。

我发现最奇怪的是usr在您的路径中出现了两次,这很可能表明问题出在哪里:dpkg-shlibdeps(通过链接器)可能在标准路径(例如usr/lib包路径(例如debian/7digital-mono/usr/lib),但它不会查看debian/7digital-mono/usr/usr/lib

于 2013-03-04T07:18:08.500 回答
1

相应地更改"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

或者

LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):/path-1-to-shared-library:/path-2-to-shared-library dh binary-arch

或者

LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):/path-to-shared-library dh binary-arch
于 2014-06-24T04:27:28.457 回答