0

I have three debian packages which will be installed with apt-get. Let's call them X, Y, and Z.

Both Y and Z depend on X, but do not depend on each other. If the user wants to install both Y and Z, they should be able to do so. What I would want to happen is: 1. User installs Y. The installation of Y installs X. 2. User installs Z. The installation of Z checks to make sure X is installed and since it is installed, Z is installed properly.

Instead Z fails with an error that says "trying to overwrite which is also in package Y." Then there are some other error messages and Z isn't installed.

Is there some other relationship I need to setup between these packages?

Right now I'm creating these with the program 'fpm' like this:

fpm -n Y --depends X -t deb -s dir <folder>
fpm -n Z --depends X -t deb -s dir <folder>
brant
  • 369
  • 3
  • 8
  • That's simply a bug in your packages. See the Debian manual -- you could declare confict/replaces/overwrites but the cleaner approach is to not have conflicts. – Dirk Eddelbuettel Apr 14 '17 at 21:56
  • Do you happen to run both `fpm` calls on the same directory (it is unclear if `` from your post is generic placeholder or if they actually refer to the same directory in file system)? Because apt will refuse to install package that provides file that is already installed by another package. You can [work around this by using dpkg --force-overwrite](https://askubuntu.com/questions/176121/dpkg-error-trying-to-overwrite-file-which-is-also-in), but if two packages provide the same file, then they are clearly not co-installable. – Mirek Długosz Apr 14 '17 at 21:56
  • If your two packages legitimately provide the same functionality (like `awk` binary can be provided by `gawk` and `mawk`), then read about dpkg alternatives system. – Mirek Długosz Apr 14 '17 at 22:06
  • is just a generic placeholder for the folder with the package contents. The packages do not use the same . – brant Apr 17 '17 at 21:03
  • 1
    Does this answer your question? [unable to run apt-get -f install on debian](https://stackoverflow.com/questions/70795304/unable-to-run-apt-get-f-install-on-debian) – karel Jan 21 '22 at 11:17

0 Answers0