Score:0

ubuntu keeps overriding a package installed with dpkg

cn flag

I compiled a custom gnu screen deb pkg and installed with dpkg -i, but after some time I noticed screens' version got back to one from ubuntu's repo. I tried to run apt-mark hold screen before overriding screen with my package, that did not work. Then I tried to do the same but first install my package and then run apt mark hold - did not work either. Also tried to purge the ubuntu's package and then install mine, did not work. Also I tried to add a rule blocking screen installation to /etc/apt/preferences.d, still no luck. What to try next to make ubuntu to not touch my custom packages? Thanks in advance

ubuntu 20.04 lts

Nmath avatar
ng flag
More specifics are needed. Ex. What is the package name, what are its dependencies, which package(s) is overriding your package, etc.
Volodymyr Boiko avatar
cn flag
@Nmath gnu screen, the package name is `screen`. depends on libc6 libcrypt libpam libtinfo libutempter
Nmath avatar
ng flag
There's already a package by that name, so your package manager is going to replace your package with the most up-to-date version in repos. Can you use another name for your package?
Volodymyr Boiko avatar
cn flag
@Nmath yeah, thought about that. What I do not like it that screen is referenced in some metapackages; if I install them, my executable/shared libs will get overriden. I'm not sure if I understand the current behaviour of apt mark and cannot rely on that ubuntu's version wont get installed.
Volodymyr Boiko avatar
cn flag
and I do not want to workaround, but find a complete solution
cn flag
Renaming an app is not a workaround :) Mind that a version is overwritten if the version number of the new one is higher... so compile yours with a higher number than screen would ever use and it wont get overwritten (but THAT is a workaround).
user10489 avatar
in flag
Best solution would be to name your package screen-mine-$version and have it install in /usr/local/ or /opt/screen-mine so that both versions could co-exist.
nobody avatar
gh flag
can you show `apt-cache policy screen` ?
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.