我创建了一个带有可执行文件的目录结构。以下是树的输出:
program-5
├── debian
│ ├── DEBIAN
│ │ ├── changelog
│ │ ├── compat
│ │ ├── control
│ │ ├── copyright
│ │ ├── docs
│ │ ├── emacsen-install.ex
│ │ ├── emacsen-remove.ex
│ │ ├── emacsen-startup.ex
│ │ ├── init.d.ex
│ │ ├── manpage.1.ex
│ │ ├── manpage.sgml.ex
│ │ ├── manpage.xml.ex
│ │ ├── menu.ex
│ │ ├── postinst.ex
│ │ ├── postrm.ex
│ │ ├── preinst.ex
│ │ ├── prerm.ex
│ │ ├── program.cron.d.ex
│ │ ├── program.debhelper.log
│ │ ├── program.default.ex
│ │ ├── program.doc-base.EX
│ │ ├── README.Debian
│ │ ├── README.source
│ │ ├── rules
│ │ └── watch.ex
│ └── usr
│ └── local
│ └── include
│ └── myprog
│ ├── file.txt
└── program *(executable)*
然而,这不适用于“file.txt”。我希望这个文件进入/ usr / local / include / myprog /但是没有发生。它给了我错误:
(Reading database ...
(Reading database ... 5%
...
(Reading database ... 100%
(Reading database ... 204105 files and directories currently installed.)
Unpacking program-v5 (from .../program-5_1.4.2_i386.deb) ...
dpkg: error processing /tmp/program-5/debian/program-5_1.4.2_i386.deb (--install):
trying to overwrite '/usr/local/include/myprog/file.txt', which is also in package program2 20120329-1
dpkg-deb (subprocess): data: internal gzip write error: Broken pipe
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg-deb (subprocess): failed in write on buffer copy for failed to write to pipe in copy: Broken pipe
Errors were encountered while processing:
/tmp/program-5/debian/program-5_1.4.2_i386.deb
有人可以提供任何建议吗?
答案 0 :(得分:4)
错误非常明确:您尝试安装program-v5
并尝试覆盖已存在并由包program2
拥有的文件。
所以你需要
在安装program2
或
program-v5
在Conflicts:
中添加所需的Provides:
,Replaces:
,debian/control
标记 - 请参阅文档。
最后,对于软件包,/usr
是/usr/local
更自然的选择。
答案 1 :(得分:2)
从错误消息:
尝试覆盖'/usr/local/include/myprog/file.txt',这是 也在程序包2中
您的系统上已经安装了已安装此文件program2
的软件包usr/local/include/myprog/file.txt
。
您应首先卸载此程序包dpkg -r program2