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?
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.