2017-08-09 74 views
0

它爲什麼不構建?部分問題輸出如下。使用pbuilder-dist xenial構建失敗

Making distclean in src 
make[2]: Entering directory '/build/opensh-0.1/src' 
cd .. && /bin/sh ./config.status src/Makefile depfiles 
config.status: creating src/Makefile 
./config.status: 1517: ./config.status: gawk: not found 
config.status: error: could not create src/Makefile 
Makefile:689: recipe for target 'Makefile' failed 
make[2]: *** [Makefile] Error 127 
make[2]: Leaving directory '/build/opensh-0.1/src' 
Makefile:810: recipe for target 'distclean-recursive' failed 
make[1]: *** [distclean-recursive] Error 1 
make[1]: Leaving directory '/build/opensh-0.1' 
dh_auto_clean: make -j1 distclean returned exit code 2 
debian/rules:18: recipe for target 'clean' failed 
make: *** [clean] Error 2 
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2 
I: copying local configuration 
E: Failed autobuilding of package 
I: unmounting dev/pts filesystem 
I: unmounting run/shm filesystem 
I: unmounting proc filesystem 
I: cleaning the build env 
I: removing directory /var/cache/pbuilder/build/23507 and its subdirectories 

我絕對已經安裝了gawk,並且沒有什麼奇怪的配置。我的debian/control

$ more debian/control 
Source: opensh 
Section: utils 
Priority: optional 
Maintainer: Niklas Larsson <[email protected]> 
Build-Depends: debhelper (>=9),autotools-dev 
Standards-Version: 3.9.6 
Homepage: <insert the upstream URL, if relevant> 
#Vcs-Git: git://anonscm.debian.org/collab-maint/opensh.git 
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/opensh.git 

Package: opensh 
Architecture: any 
Depends: ${shlibs:Depends}, ${misc:Depends} 
Description: <insert up to 60 chars description> 
<insert long description, indented with spaces> 
+1

你可以在你的問題中包含你的'debian/control'文件嗎?至少它的依賴關係? –

+0

@FlorianWeimer我包含了該文件。我有安裝的依賴關係。我不明白。它的製造質量很好,但包裝工具失敗了。 –

回答

1

debian/control文件不正確。 gawk不是必需或必需的包,因此它不包含在默認的pbuilder環境中。如果構建過程需要它,則需要明確列出:

Build-Depends: debhelper (>=9), autotools-dev, gawk 

它不在安裝在pbuilder環境之外。故意將環境保持最小限度以實施正確的構建依賴關係。

+0

我想這與下一次失敗是一樣的:'/ usr/bin/ld:找不到-lbsd '我應該添加依賴'libbsd-dev'? –

+1

對,如果你的軟件包需要它,你還需要添加'libbsd-dev'。歡迎來到Debian(好的,Ubuntu)的包裝! –