0

Below is the working control file while creating debian package using the link. I kept a single dependency and it is creating the deb file.

Package: my-program
Version: 1.0
Architecture: all
Essential: no
Priority: optional
Depends: default-jdk
Maintainer: Your Name
Description: A short desc

The folder structure created; under testing I kept few files.

├── my-program_version_architecture
│   └── DEBIAN
│       ├── control
│       └── usr
│           └── local
│               └── share
│                   └── testing
│                       ├── remaining files

I ran below command:

dpkg-deb --build my-program_version_architecture/

The deb file got created but when I ran below command to install the deb file, I am getting error.

sudo apt install ./my-program_version_architecture.deb

The error I got:

> Reading package lists... Done Building dependency tree Reading state
> information... Done Note, selecting 'my-program' instead of
> './my-program_version_architecture.deb' The following NEW packages
> will be installed:   my-program 0 upgraded, 1 newly installed, 0 to
> remove and 14 not upgraded. Need to get 0 B/107 MB of archives. After
> this operation, 0 B of additional disk space will be used. Get:1
> /home/azureuser/debpkgs/my-program_version_architecture.deb my-program
> all 1.0 [107 MB] dpkg: error processing archive
> /home/azureuser/debpkgs/my-program_version_architecture.deb
> (--unpack):  unable to open file '/var/lib/dpkg/tmp.ci//usr': Is a
> directory Errors were encountered while processing: 
> /home/azureuser/debpkgs/my-program_version_architecture.deb E:
> Sub-process /usr/bin/dpkg returned an error code (1)
Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
uday
  • 352
  • 10
  • 30

1 Answers1

1

It seems the package structure is not as shown in other videos or forums.

The folders to be installed should be outside DEBIAN folder, not inside.

Reference link.

uday
  • 352
  • 10
  • 30