我尝试使用命令
构建软件包sudo fakeroot dpkg-buildpackage -F.
在ternimal中遇到了这些结果。
dpkg-buildpackage: source package calender
dpkg-buildpackage: source version 1.5-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Nandaraj <nandaraj.ks@marlabs.com>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build calender-1.5
debian/rules clean
debian/rules:18: *** missing separator. Stop.
dpkg-buildpackage: error: debian/rules clean gave error exit status 2
我的规则文件是:
#!/usr/bin/make -f
icon=$(CURDIR)/calender.png
script=$(CURDIR)/calender.py
launcher=$(CURDIR)/calender.desktop
links=$(CURDIR)/links.txt
DEST1=$(CURDIR)/debian/calender/usr/share/calender
DEST2=$(CURDIR)/debian/calender/usr/share/applications
build: build-stamp
build-stamp:
dh_testdir
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
dh_clean
install: build clean $(icon) $(script) $(links) $(launcher)
dh_testdir
dh_testroot
dh_prep
dh_installdirs
mkdir -m 755 -p $(DEST1)
mkdir -m 755 -p $(DEST2)
install -m 666 $(icon) $(DEST1)
install -m 777 $(script) $(DEST1)
install -m 666 $(links) $(DEST1)
install -m 777 $(launcher) $(DEST2)
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installman
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
我的.desktop文件是:
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_IN]=/
Name[en_IN]=calender
Exec=/usr/share/applications/calender.py
Comment[en_IN]=program prints calender
Name=calender
Comment=program prints calender
Icon=/usr/share/calender/cal.png
Categories=Network;GTK;GNOME
无法构建软件包问题
debian/rules:18: *** missing separator. Stop.
dpkg-buildpackage: error: debian/rules clean gave error exit status 2
答案 0 :(得分:4)
这可能是由debian/rules
nano
编辑/usr/share/nano/sh.nanorc
的第一行&amp;将其更改为:
syntax "sh" "\.sh$" "rules"
现在,当您使用debian/rules
修改nano
时,空格将显示为绿色。
答案 1 :(得分:0)
这是在目标之后的行之前有空格而不是制表符时生成的常见错误。在这种情况下,目标看起来像clean
。因此,检查干净目标后面的行,看看它们是否在文本开头之前包含空格。
答案 2 :(得分:0)
就我而言: 此错误消息“ dpkg-buildpackage:错误:debian / rules clean给错误退出状态2”仅表示: “ debian / rules文件中的操作之一失败。” 您应该修复实际错误,通常是此错误消息之前的错误消息。
答案 3 :(得分:0)
试试
fakeroot sudo make -j4 deb-pkg