1

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

But if I keep multiple dependencies, I am getting error. The dependencies I kept are not actual, just for testing.

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

dpkg-deb --build my-program_version_architecture/ dpkg-deb: error: parsing file 'my-program_version_architecture//DEBIAN/control' near line 6 package 'my-program': 'Depends' field, invalid package name 'default-jdk;net-tools': character ';' not allowed (only letters, digits and characters '-+._')

Even for the deb file created with single dependency, when I am trying to install, I am getting error as below, for the folder I kept in DEBIAN folder for installation.

dpkg: error processing archive /home/azureuser/my-program_version_architecture.deb (--unpack): unable to open file '/var/lib/dpkg/tmp.ci//testing': Is a directory

1 Answer 1

2

Syntactically, the ; is not the correct separator, but ,. Therefore, it is treated as a part of the package name. From Declaring relationships between packages, emphasis is mine:

These fields all have a uniform syntax. They are a list of package names separated by commas.

In the DependsRecommendsSuggestsPre-DependsBuild-DependsBuild-Depends-Indep and Build-Depends-Arch control fields of the package, which declare dependencies on other packages, the package names listed may also include lists of alternative package names, separated by vertical bar (pipe) symbols |. In such a case, that part of the dependency can be satisfied by any one of the alternative packages.

They also give examples:

Package: mutt 
Version: 1.3.17-1 
Depends: libc6 (>= 2.2.1), default-mta | mail-transport-agent

It is also good to take a look at the Syntax of control files.

5
  • Thank you, I need to install tomcat Version 9.0.35 and deploy some war files and install some related files. Can you suggest how to do this.
    – uday
    Commented Feb 28, 2021 at 7:29
  • And also getting error while installing some files. dpkg: error processing archive /home/azureuser/my-program_version_architecture.deb (--unpack): unable to open file '/var/lib/dpkg/tmp.ci//testing': Is a directory
    – uday
    Commented Feb 28, 2021 at 7:30
  • 1
    These are other, distinguished questions. Please open other questions on these issues, preferably one at a time and with a lot more details. In order to help solving a problem one should be able to replicate it. Commented Feb 28, 2021 at 7:34
  • I submitted one question for tomcat and war file. serverfault.com/questions/1055365/….
    – uday
    Commented Feb 28, 2021 at 9:31
  • And also this: serverfault.com/questions/1055375/…
    – uday
    Commented Feb 28, 2021 at 11:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .