gpt4 book ai didi

debian - dpkg构建包报错: debian/rules clean gave error exit status 2

转载 作者:行者123 更新时间:2023-12-01 16:09:40 24 4
gpt4 key购买 nike

我尝试使用命令构建包

sudo fakeroot dpkg-buildpackage -F.

并在最终遇到了这些结果。

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

最佳答案

这可能是由 debian/rules 中某处的空格引起的

对于 nano,编辑 /usr/share/nano/sh.nanorc 的第一行并将其更改为:

语法“sh”“\.sh$”“规则”

现在,当您使用 nano 编辑 debian/rules 时,空格将显示为绿色。

关于debian - dpkg构建包报错: debian/rules clean gave error exit status 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27919812/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com