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

Cannot switch from edge to stable channel #105

Open
furgo16 opened this issue Oct 23, 2023 · 2 comments
Open

Cannot switch from edge to stable channel #105

furgo16 opened this issue Oct 23, 2023 · 2 comments

Comments

@furgo16
Copy link
Contributor

furgo16 commented Oct 23, 2023

I've been using the edge channel for a while, until I've hit on a few regressions and decided to go back to the stable channel. When trying to do so on the command line, I'm getting this error:

snap refresh freecad --channel=stable
error: cannot perform the following tasks:
- Setup snap "freecad" (759) security profiles (cannot update mount namespace of snap "freecad": cannot update preserved namespace of snap "freecad": cannot update snap namespace: cannot create symlink in "/usr/share/libdrm/amdgpu.ids": existing file in the way)

The only workaround I could find was to remove the freecad snap alltogether and reinstall from the stable channel from scratch.

@p-himik
Copy link

p-himik commented Dec 14, 2023

Just stumbled upon this as well. Not an expect on snaps, but it seems that snapcraft.yml mentions files that come not from snap dependencies of the snap package for FreeCAD, but rather from the system. An attempt to downgrade the snap tries to do something with the files mentioned in the layout section.
It's not just the aforementioned /usr/share/libdrm/amdgpu.ids that on my system comes from an installed libdrm-common. When I renamed that file just to see what happens, I got a different error:

error: cannot perform the following tasks:
- Setup snap "freecad" (759) security profiles (cannot update mount namespace of snap "freecad": cannot update preserved namespace of snap "freecad": cannot update snap namespace: remove /usr/bin/mpirun: no such file or directory)

No clue why it says "no such file" given that it exists and at least on my machine /usr/bin/mpirun is handled by the Ubuntu's alternatives system and is a symbolic link to /etc/alternatives/mpirun, which in turn is a symbolic link to /usr/bin/mpirun.openmpi that comes from openmpi-bin. Seems to be related to #100, not sure.

But at least reinstalling the package worked, although it took quite a bit of time.

@furgo16
Copy link
Contributor Author

furgo16 commented Jan 9, 2024

I ended up working around this by using parallel snap installs

  1. First enable the experimental feature: sudo snap set system experimental.parallel-instances=true
  2. Then install one FreeCAD version: snap install --channel=edge freecad
  3. Then install the other FreeCAD version and give it a different name: snap install --channel=stable freecad_stable

I've been using this approach successfully for a few weeks now and I have not noticed any issues. I have both edge and stable installed and I can switch between them or have them running at the same time. I generally use edge, but whenever I hit a regression, I go back to stable. I hope this can help anyone in a similar situation.

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

No branches or pull requests

2 participants