Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: “zypper up” throws “Problem: cannot install both…”

  1. #1

    Default “zypper up” throws “Problem: cannot install both…”

    tl;dr: zypper up throws a "cannot install both..." error when I don't want to install both; I want to update to the new one and discard the old one.
    _______________________________________
    I'm using SLES 12 (this should not matter, the issue is package management), and trying to enable automatic ("zypper up") updates for a package I support, let's call it cli-tools. One of the dependencies is a kernel module called k-module. Because kABI compatibility is only an expectation within a service pack, a different version is needed for each SP. I installed version 2 of cli-tools while on SP4, and then migrated to SP5. You can see with zypper se -s that k-module was installed as a byproduct ("i"):

    Code:
    S  | Name                                      | Type       | Version                       | Arch   | Repository
      ---+-------------------------------------------+------------+-------------------------------+--------+----------------------
      v  | cli-tools                                 | package    | 3                             | x86_64 | repo
      i+ | cli-tools                                 | package    | 2                             | x86_64 | repo
    
      v  | k-module                                  | package    | 3                             | x86_64 | repo
      i  | k-module                                  | package    | 2                             | x86_64 | repo
    When I run zypper up it throws:

    Code:
    The following 2 package updates will NOT be installed:
        cli-tools k-module
    When I run zypper up cli-tools it says:
    Code:
      Problem: cli-tools-3 requires k-module = source.version_4.12.14_122.20, but this requirement cannot be provided
        uninstallable providers: k-module-source.version_4.12.14_122.20-3[repo]
    When I run zypper up k-module it throws:


    Code:
    Problem: cannot install both k-module-source.version_4.12.14_95.51-2.x86_64 and k-module-source.version_4.12.14_122.20-3.x86_64
    
      Solution 1: Following actions will be done:
      replacement of k-module-source.version_4.12.14_95.51-2.x86_64 with  k-module-source.version_4.12.14_122.20-3.x86_64
      deinstallation of k-module-source.version_4.12.14_95.51-2.x86_64
    This is bizarre. I don't want to install both of them: I want to replace version 2 with version 3. Indeed, if I select option 1, that's exactly what happens: the new version gets installed, the old one deleted. But why can't this be accomplished with just a simple ```zypper up```? Any advice?


    (Crossposted with https://stackoverflow.com/questions/...t-install-both, will update either thread if an answer is provided.)

  2. #2
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    2,396

    Default Re: “zypper up” throws “Problem: cannot install both…”

    How I would do it:
    Code:
    rpm -e --nodeps oldpackageversion
    zypper in newpackageversion
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 15.1, TW, 15.2 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&15.1 on i965P/Radeon
    Tertiary: TW,15.2,15.1,Fedora,Debian,more on Kaby Lake,iQ45,iQ43,iG41,iG3X,i965G,AMD,NVidia&&&

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,769
    Blog Entries
    2

    Default Re: “zypper up” throws “Problem: cannot install both…”

    Unless I'm reading your post incorrectly,
    The default behavior and what "zypper up" is telling you, is that both your cli-tools and its dependencies are being upgraded to the latest.
    It's not saying that both versions are being retained if that is your real question... It's telling you that everything is being updated to newer versions.
    It's basically warning you that your old version is being replaced because it cannot exist side by side with the new version.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4

    Default Re: “zypper up” throws “Problem: cannot install both…”

    Quote Originally Posted by tsu2 View Post
    Unless I'm reading your post incorrectly,
    The default behavior and what "zypper up" is telling you, is that both your cli-tools and its dependencies are being upgraded to the latest.
    It's not saying that both versions are being retained if that is your real question... It's telling you that everything is being updated to newer versions.
    It's basically warning you that your old version is being replaced because it cannot exist side by side with the new version.

    TSU
    Why would you expect "zypper up" to retain both versions? In other words, why am I being warned that they can't co-exist? I want "zypper up cli-tools" to just automatically update that package and its dependencies without saying:

    Code:
    The following 2 package updates will NOT be installed:
        cli-tools k-module

  5. #5

    Default Re: “zypper up” throws “Problem: cannot install both…”

    Quote Originally Posted by mrmazda View Post
    How I would do it:
    Code:
    rpm -e --nodeps oldpackageversion
    zypper in newpackageversion
    Oh, the difficulty is not in actually upgrading it. You can just do "zypper up k-module" and use Solution 1. But that's not what I'm after: what I'm after is the package being automatically updated, with no user interaction, by an argument-less "zypper up"

  6. #6
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    2,396

    Default Re: “zypper up” throws “Problem: cannot install both…”

    I read the other post. I'm guessing you crossed a border (SP4->SP5) requiring distribution upgrade to be able to handle the update with no fuss. Did you try simply?:
    Code:
    zypper in package
    Zypper knows how to substitute upgrade-to-new-version process for new install process when attempting to "install" a currently installed package.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 15.1, TW, 15.2 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&15.1 on i965P/Radeon
    Tertiary: TW,15.2,15.1,Fedora,Debian,more on Kaby Lake,iQ45,iQ43,iG41,iG3X,i965G,AMD,NVidia&&&

  7. #7

    Default Re: “zypper up” throws “Problem: cannot install both…”

    Quote Originally Posted by YachadBoss View Post
    Why would you expect "zypper up" to retain both versions? In other words, why am I being warned that they can't co-exist? I want "zypper up cli-tools" to just automatically update that package and its dependencies without saying:

    Code:
    The following 2 package updates will NOT be installed:
        cli-tools k-module
    Quote Originally Posted by mrmazda View Post
    I read the other post. I'm guessing you crossed a border (SP4->SP5) requiring distribution upgrade to be able to handle the update with no fuss. Did you try simply?:
    Code:
    zypper in package
    Zypper knows how to substitute upgrade-to-new-version process for new install process when attempting to "install" a currently installed package.
    "zypper in k-module" throws the same exact error as "zypper up k-module": "Problem: cannot install both..."

  8. #8

    Default Re: “zypper up” throws “Problem: cannot install both…”

    If I run "zypper list-updates" I get nothing. But if I run "zypper list-updates --all" I get:

    Code:
    S | Repository            | Name                      | Current Version                 | Available Version             | Arch
    --+-----------------------+---------------------------+------------------------------+-------------------------------+-------
    v | repo                  | k-module | source.version_4.12.14_95.51-2  | source.version_4.12.14_122.20-3 | x86_64
    I just don't even see how there is a dependency issue. I uninstalled the packages that depend on k-module, so I can't see what dependency barrier there could be to updating it to the newer one. Like, if there were a package that depended on a specific version of k-module, then I'd understand zypper preventing me from just changing the version of k-module without warning. But as far as I can tell, k-module is alone.

  9. #9

    Default Re: “zypper up” throws “Problem: cannot install both…”

    Sorry for multiple replies, but here's a perhaps illuminating result.

    Code:
    zypper update --force-resolution  k-module
    
    The following 2 NEW packages are going to be installed:
      k-module (version 3) k-module-tests (version 3)
    
    The following 2 packages are going to be REMOVED:
      k-module (version 2) k-module-tests (version 2)
    
    The following package is going to be upgraded:
      cli-tools
    For whatever reason, zypper sees cli-tools as something that can be upgraded, but it sees k-module as something that cannot be upgraded; it must instead be uninstalled and reinstalled. Maybe this is related to k-module being a kernel module and the kABI changes in between service packs. Does anyone know how I'd go about investigating this more? It's important to me that "zypper up" work without any user interaction beyond yes/no.

  10. #10
    Join Date
    Sep 2012
    Posts
    5,918

    Default Re: “zypper up” throws “Problem: cannot install both…”

    Quote Originally Posted by YachadBoss View Post
    Any advice?
    Post link to your kernel package, not some fictitious description. And post real output of zypper, not redacted variant. Any reply based on information so far will reflect how others interpret what you said, not your actual issue.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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