Ubuntu 创建Debian包失败
我正在尝试构建一个Debian包。当我再次尝试构建它时,它失败了 我有:Ubuntu 创建Debian包失败,ubuntu,debian,packages,Ubuntu,Debian,Packages,我正在尝试构建一个Debian包。当我再次尝试构建它时,它失败了 我有: /home/debpackage/debianpackage_1.0.orig.tar.gz 上面的tar包含一个名为debianpackage-1.0/的文件夹(其中包含各种包) 我提取了焦油,现在我有了 /home/alon/debpackage/debianpackage_1.0.orig.tar.gz /home/alon/debpackage/debianpackage-1.0/(提取的所有文件) 在/home/
/home/debpackage/debianpackage_1.0.orig.tar.gz
debianpackage-1.0/
的文件夹(其中包含各种包)/home/alon/debpackage/debianpackage_1.0.orig.tar.gz
/home/alon/debpackage/debianpackage-1.0/
(提取的所有文件)/home/alon/debpackage/debianpackage-1.0/
中,我创建了一个名为“debian”的文件夹/home/alon/debpackage/debianpackage-1.0/
中,我有:
/debian/changelog/copyright
(空)
/debian/changelog/rules
/debian/changelog/changelog
/debian/changelog/compact
(包含“8”)
/debian/changelog/control
/debian/changelog/source/format
(包含3.0(棉被))规则
包含:
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_install:
$(MAKE) DESTDIR=$$(pwd)/debian/debianpackage prefix=/usr install
当我尝试运行/debian/debuild-us-uc
时,我得到:
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor):
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions
dpkg-buildpackage: source package debianpackage
dpkg-buildpackage: source version 1.0-1
dpkg-buildpackage: source changed by root <alon.zeiri@gmail.com>
dpkg-source --before-build debianpackage-1.0
dpkg-buildpackage: host architecture amd64
fakeroot debian/rules clean
dh clean
dh: Compatibility levels before 5 are deprecated.
dh_testdir
dh_auto_clean
dh_auto_clean: Compatibility levels before 5 are deprecated.
dh_clean
dh_clean: Compatibility levels before 5 are deprecated.
dpkg-source -b debianpackage-1.0
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building debianpackage using existing ./debianpackage_1.0.orig.tar.gz
dpkg-source: info: building debianpackage in debianpackage_1.0-1.debian.tar.gz
dpkg-source: info: building debianpackage in debianpackage_1.0-1.dsc
debian/rules build
dh build
dh: Compatibility levels before 5 are deprecated.
dh_testdir
dh_auto_configure
dh_auto_configure: Compatibility levels before 5 are deprecated.
dh_auto_build
dh_auto_build: Compatibility levels before 5 are deprecated.
dh_auto_test
dh_auto_test: Compatibility levels before 5 are deprecated.
fakeroot debian/rules binary
dh binary
dh: Compatibility levels before 5 are deprecated.
dh_testroot
dh_prep
dh_prep: Compatibility levels before 5 are deprecated.
dh_installdirs
dh_installdirs: Compatibility levels before 5 are deprecated.
debian/rules override_dh_auto_install
make[1]: Entering directory `/home/alon/debpackage/debianpackage-1.0'
/usr/bin/make DESTDIR=$(pwd)/debian/debianpackage prefix=/usr install
make[2]: Entering directory `/home/alon/debpackage/debianpackage-1.0'
make[2]: *** No rule to make target `install'. Stop.
make[2]: Leaving directory `/home/alon/debpackage/debianpackage-1.0'
make[1]: *** [override_dh_auto_install] Error 2
make[1]: Leaving directory `/home/alon/debpackage/debianpackage-1.0'
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1335:
dpkg-buildpackage -rfakeroot -D -us -uc failed
dpkg buildpackage-rfakeroot-D-us-uc
dpkg buildpackage:警告:在根目录下使用增益根目录命令
dpkg buildpackage:从dpkg buildflags导出CFLAG(来源:供应商):-g-O2
dpkg buildpackage:从dpkg buildflags导出CPPFLAGS(来源:供应商):
dpkg buildpackage:从dpkg buildflags导出CXXFLAGS(来源:供应商):-g-O2
dpkg buildpackage:从dpkg buildflags导出FFLAG(来源:供应商):-g-O2
dpkg buildpackage:从dpkg buildflags导出LDFLAGS(来源:供应商):-Wl,-B符号函数
dpkg buildpackage:源包debianpackage
dpkg buildpackage:源版本1.0-1
dpkg buildpackage:根目录更改了源
dpkg源——构建debianpackage-1.0之前
dpkg构建包:主机体系结构amd64
fakeroot debian/rules clean
徖生署清洁
dh:不推荐使用5之前的兼容级别。
dh_testdir
dh_自动_清洁
dh_auto_clean:不推荐使用5之前的兼容级别。
徖生署清洁
dh_clean:不推荐使用5之前的兼容级别。
dpkg源-b debianpackage-1.0
dpkg源:信息:使用源格式'3.0(棉被)'
dpkg来源:信息:使用现有的./debianpackage_1.0.orig.tar.gz构建debianpackage
dpkg来源:信息:在debianpackage_1.0-1.debian.tar.gz中构建debianpackage
dpkg来源:信息:在debianpackage_1.0-1.0中构建debianpackage
debian/规则构建
dh构建
dh:不推荐使用5之前的兼容级别。
dh_testdir
dh_自动_配置
dh_自动_配置:不推荐使用5之前的兼容级别。
dh_自动构建
dh_自动构建:不推荐使用5之前的兼容级别。
dh_自动_测试
dh_自动_测试:不推荐使用5之前的兼容性级别。
fakeroot debian/规则二进制
dh二进制
dh:不推荐使用5之前的兼容级别。
杜仲
dh_预备队
dh_prep:不推荐使用5之前的兼容级别。
dh_installdirs
dh_installdirs:不推荐使用5之前的兼容级别。
debian/规则覆盖\u dh\u自动安装
make[1]:进入目录“/home/alon/debpackage/debianpackage-1.0”
/usr/bin/make DESTDIR=$(pwd)/debian/debianpackage prefix=/usr install
make[2]:进入目录“/home/alon/debpackage/debianpackage-1.0”
make[2]:***没有使目标“安装”的规则。停止
make[2]:离开目录“/home/alon/debpackage/debianpackage-1.0”
make[1]:***[覆盖自动安装]错误2
make[1]:离开目录“/home/alon/debpackage/debianpackage-1.0”
make:**[binary]错误2
dpkg buildpackage:错误:fakeroot debian/rules二进制文件给出错误退出状态2
Debild:第1335行出现致命错误:
dpkg buildpackage-rfakeroot-D-us-uc失败
有什么想法吗?您的上游源代码的makefile(“debianpackage-1.0”)似乎没有
install
目标,但在override\u dh\u auto\u install
目标中,您明确地调用了make install
可能的解决办法:
- 将
目标添加到debianpackage-1./Makefile 如果您不是上游,那么应该通过debian/patches中的路径执行此操作install
- 使用
目标手动将文件安装到正确的位置override\u dh\u auto\u install
顺便说一句,为什么您首先要覆盖
dh_auto_install
?您似乎没有添加任何未自动调用的内容。为什么您的debian/changelog
是一个目录?你不应该有debian/changelog/rules
和debian/changelog/changelog
等。它应该是debian/changelog
(常规文件),debian/rules
,debian/control
。。。你的目录结构出了问题
你应该cddebian;mv-changelog-oopsdir;mv-i oopsdir/*。;rmdir oopsdir
或者干脆把整个东西都杀掉,重新开始,因为你不知道导致
changelog
成为目录的灾难不会影响其他任何东西。如果我在debild
之前在源代码中运行cmake
,我通常会遇到这个错误debild/dpkg buildpackage
非常特别,因为它需要在干净的源代码上运行。我建议您尝试在干净的源代码上使用dh_make--createorig
生成debian文件夹及其内容,而不是手动创建。除非源代码存档的创建者在其中包含编译后的代码或自动生成的文件,否则debild
应该可以正常工作