dpkg 给出错误“是一个目录”
我正在尝试创建一个 Debain .deb 包。包已成功创建,但当我尝试安装它时,出现以下错误:
unable to open file '/var/lib/dpkg/tmp.ci//opt': Is a directory
包目录结构为:
.
└── DEBIAN
├── control
├── opt
│ └── myDir
│ └── myfile
├── postinst
└── preinst
在 preinst 中,我 - mkdir -p /opt/myDir
postinst 为空
如果我尝试要在不同的主机上安装软件包,我收到以下错误:
‘opt’的包控制信息 rmdir 没有说不是目录:目录 不为空
什么想法吗?
I am trying to create a Debain .deb package. Package is being created successfully but I am getting following error when I try to install it:
unable to open file '/var/lib/dpkg/tmp.ci//opt': Is a directory
The package directory structure is :
.
└── DEBIAN
├── control
├── opt
│ └── myDir
│ └── myfile
├── postinst
└── preinst
In preinst I've - mkdir -p /opt/myDir
postinst is empty
If I try to install package on a different host, I get below error:
package control info rmdir of `opt' didn't say not a dir: Directory
not empty
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的目录布局错误。它应该是这样的:
构建包后,您可以使用 lintian 测试其格式:
我遇到了和你一样的问题,lintian 帮我解决了。
Your directory layout is wrong. It should be like this:
After you build your package you can test its format with lintian:
I had the same problem as you and lintian helped me fix it.