Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest core22 snap breaks snapcraft #283

Closed
jonathan-conder opened this issue Nov 18, 2024 · 2 comments · Fixed by #284 or #285
Closed

Latest core22 snap breaks snapcraft #283

jonathan-conder opened this issue Nov 18, 2024 · 2 comments · Fixed by #284 or #285

Comments

@jonathan-conder
Copy link

For some reason my system picked up the beta/candidate version of core22 recently:

$ snap info core22
name:      core22
summary:   Snap runtime environment
publisher: Canonical✓
store-url: https://snapcraft.io/core22
license:   unset
description: |
  Base snaps are a specific type of snap that include libraries and dependencies common to many
  applications. They provide a consistent and reliable execution environment for the snap packages
  that use them.
  
  The core22 base snap provides a runtime environment based on Ubuntu 22.04 LTS (Jammy Jellyfish).
  
  Other Ubuntu environment base snaps include:
  -   Core 18: <https://snapcraft.io/core18>
  -   Core 20: <https://snapcraft.io/core20>
  -   Core 24: <https://snapcraft.io/core24>
  
  **Using a base snap**
  
  Base snaps are installed automatically when a snap package requires them. Only one of each type of
  base snap is ever installed.
  
  Manually removing a base snap may affect the stability of your system.
  
  **Building snaps with core22**
  
  Snap developers can use this base in their own snaps by adding the following to the snap's
  snapcraft.yaml:
  
      base: core22
  
  **Additional Information***
  
  For more details, and guidance on using base snaps, see our documentation:
  <https://snapcraft.io/docs/base-snaps>
type:         base
snap-id:      amcUKQILKXHHTlmSa7NMdnXSx02dNeeT
tracking:     latest/stable
refresh-date: today at 17:14 NZDT
channels:
  latest/stable:          20241001 2024-10-26 (1663) 77MB -
  latest/candidate:       20241029 2024-11-13 (1690) 76MB -
  latest/beta:            20241029 2024-10-29 (1690) 76MB -
  latest/edge:            20241114 2024-11-14 (1713) 76MB -
  fips-updates/stable:    20231019 2023-11-03  (952) 78MB -
  fips-updates/candidate: ↑                               
  fips-updates/beta:      ↑                               
  fips-updates/edge:      ↑                               
  fips-preview/stable:    20231019 2023-11-03  (952) 78MB -
  fips-preview/candidate: ↑                               
  fips-preview/beta:      ↑                               
  fips-preview/edge:      ↑                               
  fips/stable:            –                               
  fips/candidate:         –                               
  fips/beta:              –                               
  fips/edge:              20231019 2023-11-03  (952) 78MB -
installed:                20241029            (1690) 76MB base

Due to this I am no longer able to install snapcraft:

$ sudo snap install --classic snapcraft
error: cannot perform the following tasks:
- Run configure hook of "snapcraft" snap if present (run hook "configure": 
-----
Traceback (most recent call last):
  File "/snap/snapcraft/12961/snap/hooks/configure", line 7, in <module>
    from snapcraft.snap_config import SnapConfig
  File "/snap/snapcraft/current/lib/python3.10/site-packages/snapcraft/__init__.py", line 23, in <module>
    import snapcraft.sources  # noqa: F401
  File "/snap/snapcraft/current/lib/python3.10/site-packages/snapcraft/sources.py", line 22, in <module>
    from snapcraft_legacy.sources import get
  File "/snap/snapcraft/current/lib/python3.10/site-packages/snapcraft_legacy/__init__.py", line 340, in <module>
    from snapcraft_legacy.internal import repo  # noqa
  File "/snap/snapcraft/current/lib/python3.10/site-packages/snapcraft_legacy/internal/repo/__init__.py", line 27, in <module>
    from ._deb import Ubuntu  # noqa
  File "/snap/snapcraft/current/lib/python3.10/site-packages/snapcraft_legacy/internal/repo/_deb.py", line 39, in <module>
    from .apt_cache import AptCache
  File "/snap/snapcraft/current/lib/python3.10/site-packages/snapcraft_legacy/internal/repo/apt_cache.py", line 25, in <module>
    import apt
  File "/snap/snapcraft/current/lib/python3.10/site-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ImportError: /snap/core22/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /lib/x86_64-linux-gnu/libapt-pkg.so.6.0)
-----)

A workaround is to run:

$ sudo snap refresh core22 --revision 1663

One difference between the revisions is that 1690 is missing /snap/core22/current/lib/x86_64-linux-gnu/libapt-pkg.so.6.0. If I had to guess, c58d089 looks like it might be the cause.

Reproduction steps:

  1. Install Ubuntu Server 24.04.1 with default settings.
  2. Run these commands:
$ sudo apt update
$ sudo apt full-upgrade
$ sudo reboot
$ sudo snap install core22 --candidate
$ sudo snap install snapcraft --classic
@Meulengracht
Copy link
Member

Hey!

Thank you for reporting this, we'll get the release blocked until we just understand why removing the correct version breaks snapcraft.

@alfonsosanchezbeato
Copy link
Member

FWIW, the reason for #254 was a fix to as libapt was not meant to be shipped by core, and the wrong version was being deleted (libapt-pkg5.0 vs libapt-pkg6.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants