debmake FileNotFound 错误

debmake FileNotFound 错误

我现在遇到了 debmake 的问题。我跟着https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html#packaging-tarball第 4 章 测试 debmake

项目的目录结构如下所示

.
├── debianLaboration9
│   ├── Makefile
│   └── src
│       └── electrotest_standalone.c
└── debianLaboration9.tar.gz

我不知道这是否重要,但我的 makefile 如下所示:

prefix = /usr/local
all: electrotest


electrotest: ./src/electrotest_standalone.c
    gcc -o electrotest_standalone ./src/electrotest_standalone.c -lm
install:electrotest
    sudo install -D electrotest_standalone \
    $(DESTDIR)$(prefix)/bin/electrotest_standalone
clean:
    -rm -f electrotest_standalone

distclean:clean
uninstall:
    sudo -rm -f $(DESTDIR)$(prefix)/bin/electrotest_standalone

PHONY: all install clean distclean uninstall

为了运行 debmake,我做了

hoseopjeong@hoseopjeong-VirtualBox:~/Documents/HoseopJeong_debian_lab9$ cd debianLaboration9
hoseopjeong@hoseopjeong-VirtualBox:~/Documents/HoseopJeong_debian_lab9/debianLaboration9$ debmake

根据该网站,debmake 生成模板文件,但在我的例子中,debmake 生成 FileNotFound 错误

I: set parameters
Traceback (most recent call last):
  File "/usr/bin/debmake", line 28, in <module>
    debmake.main()
  File "/usr/lib/python3/dist-packages/debmake/__init__.py", line 104, in main
    para = debmake.para.para(para)
  File "/usr/lib/python3/dist-packages/debmake/para.py", line 44, in para
    debmail = os.getlogin() + '@localhost'
FileNotFoundError: [Errno 2] No such file or directory

我不明白为什么 debmake 会生成 FileNotFound 错误...debmake 的版本是 4.2.2-1

答案1

在 ~/.bashrc 中添加环境变量 DEBEMAIL 解决了问题

相关内容