【问题标题】:debian/rules error while .deb packaging.deb 打包时出现 debian/rules 错误
【发布时间】:2012-06-24 17:37:20
【问题描述】:

我在使用 debuild 创建 .deb 文件时遇到了一些问题

在阅读一些教程之前,我设法制作了文件,但我总是收到此错误:

    make: *** No rule to make target «build». Stop.
    dpkg-buildpackage: failure: debian/rules build gave error exit status 2
    debuild: fatal error at line 1329:
    dpkg-buildpackage -rfakeroot -D -us -uc -b failed

有什么帮助吗??

这是我的 debian 规则文件:

    #!/usr/bin/make -f
    # -*- makefile -*-
    # Sample debian/rules that uses debhelper.
    # This file was originally written by Joey Hess and Craig Small.
    # As a special exception, when this file is copied by dh-make into a
    # dh-make output file, you may use that output file without restriction.
    # This special exception was added by Craig Small in version 0.37 of dh-make.

    # Uncomment this to turn on verbose mode.
    #export DH_VERBOSE=1

    build-stamp: configure-stamp 
        dh_testdir
        touch build-stamp

    clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp
        dh_clean

    install: build
        dh_testdir
        dh_testroot
        dh_clean -k 
        dh_installdirs
        $(MAKE) install DESTDIR=$(CURDIR)/debian/pycounter
        mkdir -p $(CURDIR)/debian/pycounter

        # Copy .py files
        cp pycounter.py $(CURDIR)/debian/pycounter/opt/extras.ubuntu.com/pycounter/pycounter.py
        cp prefs.py $(CURDIR)/debian/pycounter/opt/extras.ubuntu.com/pycounter/prefs.py

        # desktop copyright and others (not complete, check)
        cp extras-pycounter.desktop $(CURDIR)/debian/pycounter/usr/share/applications/extras-pycounter.desktop

【问题讨论】:

  • 您的安装目标取决于构建,但您显示的文件中没有构建。
  • 我也没有在任何地方看到“sudo”manpages.ubuntu.com/manpages/precise/man1/make.1.html
  • 您似乎从 debian/rules 中删除了包罗万象的目标 (%: dh $@)
  • @frank:他正在使用 fakeroot 运行 dpkg-buildpackage;无需使用 sudo (man dpkg-buildpackage)
  • 请张贴并接受您的回答,这样这个问题就不再需要回答了。谢谢。

标签: debian packaging ubuntu-12.04 deb debhelper


【解决方案1】:

修复它,从头开始创建一个新文件,再次检查 debian 手册页...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-01-06
    • 2021-02-04
    • 2012-02-15
    • 2014-12-20
    • 1970-01-01
    • 1970-01-01
    • 2023-03-29
    相关资源
    最近更新 更多