我正在尝试从 tar.xz 文件构建 debhelperhttps://packages.debian.org/source/stable-backports/debhelper。我已经满足了所有依赖关系,并成功运行了 ./debhelper/lib 中的 makefile 以确保万无一失。然后我在 ./debhelper 中打开了一个终端,成功运行了 makefile,然后尝试运行debuild -us -uc
。然而它吐出了:
devonc@devongaming:~/Downloads/debhelper$ debuild -us -uc
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: source package debhelper
dpkg-buildpackage: source version 10.2.2~bpo8+1
dpkg-buildpackage: source distribution jessie-backports
dpkg-buildpackage: source changed by Niels Thykier <[email protected]>
dpkg-source --before-build debhelper
dpkg-buildpackage: host architecture amd64
fakeroot debian/rules clean
./run dh clean --no-parallel --without autoreconf
dh_auto_clean
make -j1 clean
make[1]: Entering directory '/home/devonc/Downloads/debhelper'
rm -f *.1 *.7 Debian/Debhelper/Dh_Version.pm
po4a --previous --rm-translations --rm-backups man/po4a/po4a.cfg
for lang in es pt fr de; do \
if [ -e man/$lang ]; then rmdir man/$lang; fi; \
done;
rmdir: failed to remove 'man/es': Directory not empty
rmdir: failed to remove 'man/pt': Directory not empty
rmdir: failed to remove 'man/fr': Directory not empty
rmdir: failed to remove 'man/de': Directory not empty
Makefile:88: recipe for target 'clean' failed
make[1]: ** * [clean] Error 1
make[1]: Leaving directory '/home/devonc/Downloads/debhelper'
dh_auto_clean: make -j1 clean returned exit code 2
debian/rules:14: recipe for target 'clean' failed
make: *** [clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc failed
devonc@devongaming:~/Downloads/debhelper$
如果我跑,sudo debuild -us -uc
我会得到:
devonc@devongaming:~/Downloads/debhelper$ sudo debuild -us -uc
[sudo] password for devonc:
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package debhelper
dpkg-buildpackage: source version 10.2.2~bpo8+1
dpkg-buildpackage: source distribution jessie-backports
dpkg-buildpackage: source changed by Niels Thykier <[email protected]>
dpkg-source --before-build debhelper
dpkg-buildpackage: host architecture amd64
fakeroot debian/rules clean
./run dh clean --no-parallel --without autoreconf
dh_auto_clean
make -j1 clean
make[1]: Entering directory '/home/devonc/Downloads/debhelper'
rm -f *.1 *.7 Debian/Debhelper/Dh_Version.pm
po4a --previous --rm-translations --rm-backups man/po4a/po4a.cfg
for lang in es pt fr de; do \
if [ -e man/$lang ]; then rmdir man/$lang; fi; \
done;
make[1]: Leaving directory '/home/devonc/Downloads/debhelper'
dh_clean
dpkg-source -b debhelper
dpkg-source: info: using source format '3.0 (native)'
dpkg-source: info: building debhelper in debhelper_10.2.2~bpo8+1.tar.xz
dpkg-source: info: building debhelper in debhelper_10.2.2~bpo8+1.dsc
debian/rules build
./run dh build --no-parallel --without autoreconf
dh_testdir
dh_auto_configure
dh_auto_build
make -j1
make[1]: Entering directory '/home/devonc/Downloads/debhelper'
printf "package Debian::Debhelper::Dh_Version;\n\$version='10.2.2~bpo8+1';\n1" > \
Debian/Debhelper/Dh_Version.pm
cat debhelper.pod | \
perl -e ' undef $/; foreach (@ARGV) { open (IN, $_) or die "$_: $!"; $file=<IN>; close IN; if ($file=~m/=head1 .*?\n\n(.*?) - (.*?)\n\n/s) { my $item="=item $1(1)\n\n$2\n\n"; if (" dh_installmanpages " !~ / $1 /) { $list.=$item; } else { $list_deprecated.=$item; } } } END { while (<STDIN>) { s/#LIST#/$list/; s/#LIST_DEPRECATED#/$list_deprecated/; print; }; }' dh_auto_build dh_auto_clean dh_auto_configure dh_auto_install dh_auto_test dh_bugfiles dh_builddeb dh_clean dh_compress dh_fixperms dh_gconf dh_gencontrol dh_icons dh_install dh_installcatalogs dh_installchangelogs dh_installcron dh_installdeb dh_installdebconf dh_installdirs dh_installdocs dh_installemacsen dh_installexamples dh_installgsettings dh_installifupdown dh_installinfo dh_installinit dh_installlogcheck dh_installlogrotate dh_installman dh_installmanpages dh_installmenu dh_installmime dh_installmodules dh_installpam dh_installppp dh_installudev dh_installwm dh_installxfonts dh_link dh_lintian dh_listpackages dh_makeshlibs dh_md5sums dh_movefiles dh_perl dh_prep dh_shlibdeps dh_strip dh_systemd_enable dh_systemd_start dh_testdir dh_testroot dh_ucf dh_update_autotools_config dh_usrlocal | \
pod2man --utf8 -c Debhelper -r "10.2.2~bpo8+1" --name="debhelper" --section=7 > debhelper.7
pod2man --utf8 -c Debhelper -r "10.2.2~bpo8+1" --name="debhelper" --section=7 debhelper-obsolete-compat.pod > debhelper-obsolete-compat.7
find . -maxdepth 1 -type f -perm /100 -name "dh*" \
-exec pod2man --utf8 -c Debhelper -r "10.2.2~bpo8+1" {} {}.1 \;
po4a --previous -L UTF-8 man/po4a/po4a.cfg
Discard man/de/debhelper-obsolete-compat.pod (39 of 49 strings; only 79.59% translated; need 80%).
Discard man/es/debhelper.pod (186 of 258 strings; only 72.09% translated; need 80%).
Discard man/es/debhelper-obsolete-compat.pod (39 of 49 strings; only 79.59% translated; need 80%).
Discard man/es/dh_clean.pod (20 of 28 strings; only 71.42% translated; need 80%).
Discard man/es/dh_install.pod (34 of 45 strings; only 75.55% translated; need 80%).
Discard man/es/dh_installinit.pod (42 of 56 strings; only 75% translated; need 80%).
Discard man/es/dh_strip.pod (24 of 43 strings; only 55.81% translated; need 80%).
Discard man/es/dh_systemd_enable.pod (9 of 26 strings; only 34.61% translated; need 80%).
Discard man/es/dh_systemd_start.pod (11 of 25 strings; only 44% translated; need 80%).
Discard man/es/strings-kept-translations.pod (0 of 1 strings; only 0% translated; need 80%).
set -e; \
for lang in es pt fr de; do \
dir=man/$lang; \
for file in $dir/dh*.pod; do \
prog=`basename $file | sed 's/.pod//'`; \
pod2man --utf8 -c Debhelper -r "10.2.2~bpo8+1" $file $prog.$lang.1; \
done; \
if [ -e $dir/debhelper.pod ]; then \
cat $dir/debhelper.pod | \
perl -e ' undef $/; foreach (@ARGV) { open (IN, $_) or die "$_: $!"; $file=<IN>; close IN; if ($file=~m/=head1 .*?\n\n(.*?) - (.*?)\n\n/s) { my $item="=item $1(1)\n\n$2\n\n"; if (" dh_installmanpages " !~ / $1 /) { $list.=$item; } else { $list_deprecated.=$item; } } } END { while (<STDIN>) { s/#LIST#/$list/; s/#LIST_DEPRECATED#/$list_deprecated/; print; }; }' `find $dir -type f -maxdepth 1 -name "dh_*.pod" | LC_ALL=C sort` | \
pod2man --utf8 -c Debhelper -r "10.2.2~bpo8+1" --name="debhelper" --section=7 > debhelper.$lang.7; \
fi; \
if [ -e $dir/debhelper-obsolete-compat.pod ]; then \
pod2man --utf8 -c Debhelper -r "10.2.2~bpo8+1" --name="debhelper" --section=7 $dir/debhelper-obsolete-compat.pod > debhelper-obsolete-compat.$lang.7; \
fi; \
done
make[1]: Leaving directory '/home/devonc/Downloads/debhelper'
dh_auto_test
make -j1 test
make[1]: Entering directory '/home/devonc/Downloads/debhelper'
printf "package Debian::Debhelper::Dh_Version;\n\$version='10.2.2~bpo8+1';\n1" > \
Debian/Debhelper/Dh_Version.pm
./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ && -f && -x } @ARGV' t/* t/*/*
t/dh-lib.t .......................... ok
t/dh_compress.t ..................... ok
t/dh_install.t ...................... ok
t/dh_link.t ......................... ok
t/maintscript.t ..................... ok
t/override_target.t ................. ok
t/pod.t ............................. ok
t/size.t ............................ ok
t/syntax.t .......................... ok
t/buildsystems/buildsystem_tests.t .. ok
t/dh_installdocs/dh_installdocs.t ... ok
All tests successful.
Files=11, Tests=616, 7 wallclock secs ( 0.06 usr 0.00 sys + 1.88 cusr 0.12 csys = 2.06 CPU)
Result: PASS
-# clean up log etc
./run dh_clean
make[1]: Leaving directory '/home/devonc/Downloads/debhelper'
fakeroot debian/rules binary
./run dh binary --no-parallel --without autoreconf
dh_testroot
dh_prep
debian/rules override_dh_auto_install
make[1]: Entering directory '/home/devonc/Downloads/debhelper'
./run dh_auto_install --destdir=debian/debhelper
make -j1 install DESTDIR=/home/devonc/Downloads/debhelper/debian/debhelper AM_UPDATE_INFO_DIR=no
make[2]: Entering directory '/home/devonc/Downloads/debhelper'
install -d /home/devonc/Downloads/debhelper/debian/debhelper/usr/bin \
/home/devonc/Downloads/debhelper/debian/debhelper/usr/share/debhelper/autoscripts \
/home/devonc/Downloads/debhelper/debian/debhelper/usr/share/perl5/Debian/Debhelper/Sequence \
/home/devonc/Downloads/debhelper/debian/debhelper/usr/share/perl5/Debian/Debhelper/Buildsystem
install dh dh_auto_build dh_auto_clean dh_auto_configure dh_auto_install dh_auto_test dh_bugfiles dh_builddeb dh_clean dh_compress dh_fixperms dh_gconf dh_gencontrol dh_icons dh_install dh_installcatalogs dh_installchangelogs dh_installcron dh_installdeb dh_installdebconf dh_installdirs dh_installdocs dh_installemacsen dh_installexamples dh_installgsettings dh_installifupdown dh_installinfo dh_installinit dh_installlogcheck dh_installlogrotate dh_installman dh_installmanpages dh_installmenu dh_installmime dh_installmodules dh_installpam dh_installppp dh_installudev dh_installwm dh_installxfonts dh_link dh_lintian dh_listpackages dh_makeshlibs dh_md5sums dh_movefiles dh_perl dh_prep dh_shlibdeps dh_strip dh_systemd_enable dh_systemd_start dh_testdir dh_testroot dh_ucf dh_update_autotools_config dh_usrlocal /home/devonc/Downloads/debhelper/debian/debhelper/usr/bin
install -m 0644 autoscripts/* /home/devonc/Downloads/debhelper/debian/debhelper/usr/share/debhelper/autoscripts
install -m 0644 Debian/Debhelper/*.pm /home/devonc/Downloads/debhelper/debian/debhelper/usr/share/perl5/Debian/Debhelper
[ "/usr" = /usr ] || \
sed -i '/$prefix=/s@/usr@/usr@g' /home/devonc/Downloads/debhelper/debian/debhelper/usr/share/perl5/Debian/Debhelper/Dh_Lib.pm
install -m 0644 Debian/Debhelper/Sequence/*.pm /home/devonc/Downloads/debhelper/debian/debhelper/usr/share/perl5/Debian/Debhelper/Sequence
install -m 0644 Debian/Debhelper/Buildsystem/*.pm /home/devonc/Downloads/debhelper/debian/debhelper/usr/share/perl5/Debian/Debhelper/Buildsystem
make[2]: Leaving directory '/home/devonc/Downloads/debhelper'
make[1]: Leaving directory '/home/devonc/Downloads/debhelper'
dh_installdocs
dh_installchangelogs
dh_installexamples
dh_installman
dh_perl
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package 'debhelper' in '../debhelper_10.2.2~bpo8+1_all.deb'.
dpkg-deb: building package 'dh-systemd' in '../dh-systemd_10.2.2~bpo8+1_all.deb'.
dpkg-genchanges >../debhelper_10.2.2~bpo8+1_amd64.changes
dpkg-genchanges: including full source code in upload
dpkg-source --after-build debhelper
dpkg-buildpackage: full upload; Debian-native package (full source is included)
Now running lintian...
warning: the authors of lintian do not recommend running it with root privileges!
E: debhelper changes: bad-distribution-in-changes-file jessie-backports
Finished running lintian.
devonc@devongaming:~/Downloads/debhelper$
Debuild 和 sudo debuild 也分别出现相同的错误。
我正在运行 Linux Lite 3.2(基于 Ubuntu 16.04)。这是我第二次尝试从源代码构建某些东西,所以请像对待初学者一样向我解释。
这也是我第三次在 askubuntu 上发帖(这次是从新帐户;停用了旧帐户的电子邮件),所以如果我需要编辑任何内容的格式,请告诉我。
答案1
Xenial 已经backports 存储库中的 debhelper 10.2.2。您可以从那里安装它。
打开
software-properties-gtk
→ 更新选项卡 → 启用不支持的更新 (xenial-backports)或者将这一行添加到你的
/etc/apt/sources.list
文件中deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
更新包列表
sudo apt update
检查两个包的可用版本
apt-cache policy debhelper dh-autoreconf
debhelper: Installed: 9.20160115ubuntu3 Candidate: 9.20160115ubuntu3 Version table: 10.2.2ubuntu1~ubuntu16.04.1 100 100 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages 100 http://archive.ubuntu.com/ubuntu xenial-backports/main i386 Packages *** 9.20160115ubuntu3 500 500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages 500 http://archive.ubuntu.com/ubuntu xenial/main i386 Packages 100 /var/lib/dpkg/status dh-autoreconf: Installed: 11 Candidate: 11 Version table: 12~ubuntu16.04.1 100 100 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages 100 http://archive.ubuntu.com/ubuntu xenial-backports/main i386 Packages *** 11 500 500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages 500 http://archive.ubuntu.com/ubuntu xenial/main i386 Packages 100 /var/lib/dpkg/status
强制安装来自 backports repo 的版本,因为它的优先级较低。
sudo apt install dh-autoreconf=12~ubuntu16.04.1 debhelper=10.2.2ubuntu1~ubuntu16.04.1