I am encountering some problems in distroboxes regarding vulkan packages, maybe because they are immutable in some way on the base system? To be honest I am not an expert.
The following are some example cases I ran into.
Set up ubuntu distrobox: ujust distrobox-assemble ubuntu
Then try to run:
sudo apt remove mesa-vulkan-drivers
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
The following packages will be REMOVED:
mesa-vulkan-drivers
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 54.0 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database … 43000 files and directories currently installed.)
Removing mesa-vulkan-drivers:amd64 (24.0.9-0ubuntu0.3) …
dpkg: error processing package mesa-vulkan-drivers:amd64 (–remove):
unable to securely remove ‘/usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json’: Device or resource b
usy
dpkg: too many errors, stopping
Errors were encountered while processing:
mesa-vulkan-drivers:amd64
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Result: can no longer update/install/remove any package. Trying to run “sudo apt --fix-broken install” does nothing.
Set up opensuse distrobox: ujust distrobox-assemble opensuse
The run:
sudo zypper in vulkan-headers-1.4
Loading repository data…
Reading installed packages…
Resolving package dependencies…
The following NEW package is going to be installed:
vulkan-headers
1 new package to install.
Package download size: 1.3 MiB
Package install size change:
| 28.2 MiB required by packages that will be installed
28.2 MiB | - 0 B released by packages that will be removed
Backend: classic_rpmtrans
Continue? [y/n/v/…? shows all options] (y):
Retrieving: vulkan-headers-1.4.304-1.1.noarch (openSUSE-Tumbleweed-Oss) (1/1), 1.3 MiB
Retrieving: vulkan-headers-1.4.304-1.1.noarch.rpm …[done (4.2 MiB/s)]
Checking for file conflicts: …[done]
error: unpacking of archive failed on file /usr/share/vulkan/registry/apiconventions.py;67888391: cpio: rename failed - No data available
error: vulkan-headers-1.4.304-1.1.noarch: install failed
(1/1) Installing: vulkan-headers-1.4.304-1.1.noarch …[error]
Installation of vulkan-headers-1.4.304-1.1.noarch failed:
Error: Subprocess failed. Error: RPM failed: Command exited with status 1.
End result is that I cannot install vulkan-headers at all.
I remember some other problems that I ran into with other distros but I don’t have the exact setup anymore but I’ve ran into it frequently enough that I’m wondering if its just me or if there is a potential solution.
Thanks for the info, and sorry to hear that atuin broke. I can reproduce your issue, I think the issue lies with the NVIDIA stuff.
Also happens within an Alpine box created with `--nvidia --init`. Initial removal of `vulkan-headers` and `mesa-vulkan-layers` seemed to succeed, but readding `mesa-vulkan-layers` throws a `usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json`-related error.