Score:0

Using local apt repo with packages with same name different versions

dz flag

I've created local repo with two packages

these are the control files:

Package: package-a Version: 1.0.0

Package: package-a Version: 2.0.0

when I'm doing "sudo apt install package-a=1.0.0" or "sudo apt install package-a=2.0.0" it works great.

now I want a third package:

Package: test Version: 1.0.0 Depends: package-a(=1.0.0)

If I'm trying "sudo apt install test" it doenst work, it gives me an error unmet dependencies, package-a(2.0.0) is to be installed

What am I doing wrong? I want to use Depends on a different version

Score:0
my flag

The error message arose because the package test depends on package_a=>1.0.0 but unfortunately, our "Advanced" package manager apt is trying to install the latest version of the package i.e 2.0.0. The package test is programmed to work only with the package_a=>1.0.0. To fix:

  • You can use the aptitude package manager.

  • You can install the version manually.

To install using aptitude package manager:

sudo apt update
sudo apt install aptitude 
sudo aptitude -f install test

Press n unless it proposes the correct solution.

To install manually using apt:

sudo apt update
sudo apt install package_a=1.0.0
sudo apt install test

This will successfully install test.

N.B: APT always install the latest version of the package; You can't have more that 2 version of the same package because they may cause file conflicts.

asaf anter avatar
dz flag
But its not always install the lastest version, thats why I can install with “sudo apt install package-a=1.0.0”
Someone avatar
my flag
@asafanter unless you specify a version with the `=`, it would install the latest version.
Someone avatar
my flag
@asafanter If my answer worked for you, you can hit the tick mark near the vote count to accept this answer.
asaf anter avatar
dz flag
But I specified the = in the depends field
Someone avatar
my flag
@asafanter Sorry, which field are you talking about?
asaf anter avatar
dz flag
look at my question, “test” package is depends on package-a(=1.0.0)
Someone avatar
my flag
@asafanter Seems like you are misunderstanding something.
asaf anter avatar
dz flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/133849/discussion-between-asaf-anter-and-someone).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.