无法使用“apt source”和“debuild”从源代码构建软件包

无法使用“apt source”和“debuild”从源代码构建软件包

我遇到了一个奇怪的问题。我想在 Ubuntu 18.04 上使用官方命令“apt source”,然后使用“sudo apt get build-dep”,然后使用“debuild”从源代码构建 x264 和 gpac。

对于 x264,我收到此错误:

dh_install --list-missing --sourcedir=debian/install
dh_install: Please use dh_missing --list-missing/--fail-missing instead
dh_install: This feature will be removed in compat 12.
/home/try1/x264/ubuntu/x264-0.152.2854+gite9a5903/debian/x264.install: 1: /home/try1/x264/ubuntu/x264-0.152.2854+gite9a5903/debian/x264.install: shared/usr/bin/x264: not found
/home/try1/x264/ubuntu/x264-0.152.2854+gite9a5903/debian/x264.install: 2: /home/try1/x264/ubuntu/x264-0.152.2854+gite9a5903/debian/x264.install: shared/usr/bin/x264-10bit: not found
dh_install: debian/x264.install (executable config) returned exit code 127
debian/rules:77: recipe for target 'override_dh_install' failed
make[1]: *** [override_dh_install] Error 127
make[1]: Leaving directory '/home/try1/x264/ubuntu/x264-0.152.2854+gite9a5903'
debian/rules:16: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1152:
dpkg-buildpackage -rfakeroot -us -uc -ui failed

对于 gpac 我得到了这个:

ln -sf libgpac.so.4.5.0 /home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5/debian/tmp/usr/lib/x86_64-linux-gnu/libgpac.so.4
ln -sf libgpac.so.4.5.0 /home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5/debian/tmp/usr/lib/x86_64-linux-gnu/libgpac.so
make[3]: Leaving directory '/home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5'
make[2]: Leaving directory '/home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5'
mv debian/tmp/usr/share/man/man1/mp4box.1 \
    debian/tmp/usr/share/man/man1/MP4Box.1
mv debian/tmp/usr/share/man/man1/mp4client.1 \
    debian/tmp/usr/share/man/man1/MP4Client.1
make[1]: Leaving directory '/home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5'
   dh_install -O--parallel
/home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5/debian/gpac.install: 1: /home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5/debian/gpac.install: usr/bin: not found
/home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5/debian/gpac.install: 2: /home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5/debian/gpac.install: usr/share/gpac/gpac.mp4: not found
/home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5/debian/gpac.install: 3: /home/try1/gpac/gpac-0.5.2-426-gc5ad4e4+dfsg5/debian/gpac.install: usr/share/man/man1: not found
dh_install: debian/gpac.install (executable config) returned exit code 127
debian/rules:17: recipe for target 'binary' failed
make: *** [binary] Error 127
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1152:
dpkg-buildpackage -rfakeroot -us -uc -ui failed

怎么了?

编辑:根据@Terrance的回复,我使用了以下命令:

:$ sudo apt build-dep x264 gpac
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

然后,

:$ apt source x264
:$ apt source gpac

然后,下载源完成后:

:$ cd x264-0.152.2854+gite9a5903/
:$ debuild

gpac 也一样:

:$ cd gpac-0.5.2-426-gc5ad4e4+dfsg5
:$ debuild

相关内容