Oz6848
Oz6848

Reputation: 329

How to install related package automatically with .deb package?

I try to create .deb package for my program.

It needs ImLib2-dev package.

I want to make .deb package install ImLib2-dev package automatically.

Package : MyProject
Version : 1.0.0.0
Section : base
Priority : optional
Architecture : i386
Depends:
Maintainer : xxx <[email protected]>
Description : Install Package

This is control file in DEBIAN directory of .deb package.

What should I do?

ADD

I read some documents about control file and learn about Depend, Pre-Depend.

But it just check required package is installed and exit when isn't installed

not install packages. Is there any option for installing non-exist package?


sudo dpkg -i ~~.deb
apt-get -f install 

installs dependencies, but what I want to do is do it at once with dpkg.

So I try to find the way with changing control file in deb package.

Upvotes: 1

Views: 3459

Answers (1)

brightlancer
brightlancer

Reputation: 2109

You want to look at the behavior during installation via dpkg and apt-get. apt-get (and other UI for APT) works with APT repositories and will check Depends and ask to install those packages if they aren't installed. dpkg is only able to see the files presented to it.

Upvotes: 2

Related Questions