Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Add dependency in deb file

  1. #11
    Join Date
    Nov 2015
    Beans
    19

    Re: Add dependency in deb file

    ...
    Last edited by pol2095; May 6th, 2022 at 12:40 PM.

  2. #12
    Join Date
    Nov 2015
    Beans
    19

    Re: Add dependency in deb file

    the dependencies are only installed in this case

    sudo dpkg -i myApp.deb
    sudo apt-get install -f -y
    it work only using command line but not ""double clicking" on the deb file

  3. #13
    Join Date
    May 2007
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Add dependency in deb file

    If your Debian package has a dependency, you add to the "Depends" field under the "Package" specification in the debian/control file, as shown in the wiki link i provided earlier. I believe that's the answer to your original question. You do NOT re-package the dependency in your file, nor should you do this sort of dependency management in a postinst script (even the StackOverflow answer you linked to says you shouldn't do this).

    If you want a solution that doesn't rely on package managers to help with dependencies, then you should look at "snap" packaging. I've never created snap packages myself and I have some philosophical objections to its approach, but it's an alternative packaging tool to at least be aware of.

    Cheers.

  4. #14
    Join Date
    Nov 2015
    Beans
    19

    Re: Add dependency in deb file

    "Depends" only displays a message : "can't install the app, you need a dependency" but the dependency is never installed...

  5. #15
    Join Date
    May 2007
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Add dependency in deb file

    A deb package declares its dependencies, but as far as I know, double-clicking a deb file (or using dpkg in the terminal) will never install those dependencies. It can't because the deb installer doesn't know where to get those dependencies from. This is what package managers like apt are for - they know where to get packages in the configured repositories (e.g., those specified in /etc/apt/sources.list).

    If you're not publishing your package in a repository where a package manager installs from, then you need to instruct users to first install your deb file's dependencies before they try to install the deb file.

  6. #16
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 24.04 Noble Numbat

    Re: Add dependency in deb file

    Have you tried the command
    sudo apt install /path/to/filename.deb
    which normally manages to download all dependencies for .deb packages, assuming, of course, that those dependencies are spelled out in the control file and are available in the repos.

    Unkile dpkg apt, but not as far as I'm aware apt-get will manage dependencies very well, as gdebi does, or did the last time I used it.

  7. #17
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Add dependency in deb file

    Quote Originally Posted by ajgreeny View Post
    Unkile dpkg apt, but not as far as I'm aware apt-get will manage dependencies very well, as gdebi does, or did the last time I used it.
    Long time gdebi user, and still handles deps 98% effectively.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  8. #18
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 24.04 Noble Numbat

    Re: Add dependency in deb file

    Quote Originally Posted by 1fallen View Post
    Long time gdebi user, and still handles deps 98% effectively.
    I used it a lot in the past but now that apt does the same job I see no reason to bother with it.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •