ublue-os / bazzite

Bazzite is a custom image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld.
https://bazzite.gg
Apache License 2.0
3.6k stars 211 forks source link

Unable to install any package when using rpm-ostree #1427

Closed Indoroid closed 1 month ago

Indoroid commented 1 month ago

Describe the bug

Hello! I had installed Bazzite-nvidia recently. I had rebased from fedora-silverblue to the Bazzite-nvidia image due to the ISO being corrupt when I tried flashing the image on USB for a bootable media. The system works perfectly fine. But I am unable to install any packages using rpm-ostree.

On ntering rpm-ostree install (any package name) always throws the same error i.e

Checking out tree 07f12f4... done
Enabled rpm-md repositories: copr:copr.fedorainfracloud.org:matte-schwartz:sunshine copr:copr.fedorainfracloud.org:rodoma92:kde-cdemu-manager copr:copr.fedorainfracloud.org:rodoma92:rmlint copr:copr.fedorainfracloud.org:rok:cdemu updates fedora rpmfusion-free-updates-testing rpmfusion-free-updates rpmfusion-free copr:copr.fedorainfracloud.org:codifryed:CoolerControl updates-archive
Importing rpm-md... done
rpm-md repo 'copr:copr.fedorainfracloud.org:matte-schwartz:sunshine' (cached); generated: 2024-07-28T08:50:42Z solvables: 2
rpm-md repo 'copr:copr.fedorainfracloud.org:rodoma92:kde-cdemu-manager' (cached); generated: 2024-04-20T12:39:00Z solvables: 12
rpm-md repo 'copr:copr.fedorainfracloud.org:rodoma92:rmlint' (cached); generated: 2024-05-10T10:16:28Z solvables: 4
rpm-md repo 'copr:copr.fedorainfracloud.org:rok:cdemu' (cached); generated: 2024-07-09T09:13:21Z solvables: 23
rpm-md repo 'updates' (cached); generated: 2024-07-29T02:23:18Z solvables: 22716
rpm-md repo 'fedora' (cached); generated: 2024-04-14T18:51:11Z solvables: 74881
rpm-md repo 'rpmfusion-free-updates-testing' (cached); generated: 2024-07-25T21:25:28Z solvables: 7
rpm-md repo 'rpmfusion-free-updates' (cached); generated: 2024-07-25T21:24:40Z solvables: 136
rpm-md repo 'rpmfusion-free' (cached); generated: 2024-04-20T12:11:51Z solvables: 422
rpm-md repo 'copr:copr.fedorainfracloud.org:codifryed:CoolerControl' (cached); generated: 2024-07-28T04:02:43Z solvables: 6
rpm-md repo 'updates-archive' (cached); generated: 2024-06-30T05:31:17Z solvables: 22869
Resolving dependencies... done
Checking out packages... done
error: Checkout python3-typer-0.11.1-1.fc40.noarch: Hardlinking 7a/6b546219c060088408733c7f52dc933eb191733932761ba9ca5d3fb63277bd.file to __init__.py: File exists

What did you expect to happen?

I expected rpm-ostree to install the desired package. I have tried finding the specific package via rpm-ostree but it doesnt show any output. I tired using the command rpm -qa | grep 'python' to see the issuue but it also doesn't list the specifc rpm causing the issue. Here's the output of rpm -qa | grep 'python':

aditya@fedora:~$ rpm -qa | grep python
python3-tkinter-3.12.4-1.fc40.x86_64
python-pip-wheel-23.3.2-1.fc40.noarch
python-unversioned-command-3.12.4-1.fc40.noarch
python3-libs-3.12.4-1.fc40.x86_64
python3-3.12.4-1.fc40.x86_64
python3-dbus-1.3.2-6.fc40.x86_64
python3-gobject-base-3.48.2-1.fc40.x86_64
python3-cairo-1.25.1-3.fc40.x86_64
python3-gobject-3.48.2-1.fc40.x86_64
python3-pyatspi-2.46.1-3.fc40.noarch
python3-idna-3.7-1.fc40.noarch
python3-charset-normalizer-3.3.2-3.fc40.noarch
python3-jmespath-1.0.1-6.fc40.noarch
python3-libselinux-3.6-4.fc40.x86_64
python3-packaging-23.2-4.fc40.noarch
python3-libsemanage-3.6-3.fc40.x86_64
python3-cups-2.0.4-1.fc40.x86_64
python3-certifi-2023.05.07-4.fc40.noarch
python3-distro-1.9.0-3.fc40.noarch
python3-brlapi-0.8.5-13.fc40.x86_64
sudo-python-plugin-1.9.15-2.p5.fc40.x86_64
python3-enchant-3.2.2-12.fc40.noarch
python3-langtable-0.0.67-1.fc40.noarch
python3-regex-2024.4.16-1.fc40.x86_64
python3-speechd-0.11.5-5.fc40.x86_64
libcap-ng-python3-0.8.4-4.fc40.x86_64
python3-audit-4.0.1-1.fc40.x86_64
python3-click-8.1.7-4.fc40.noarch
python3-file-magic-5.45-4.fc40.noarch
python3-louis-3.28.0-5.fc40.noarch
python3-nftables-1.0.9-3.fc40.x86_64
python3-firewall-2.1.2-2.fc40.noarch
python3-olefile-0.47-3.fc40.noarch
python3-pillow-10.3.0-1.fc40.x86_64
python3-psutil-5.9.8-1.fc40.x86_64
python3-ptyprocess-0.7.0-7.fc40.noarch
python3-pexpect-4.9.0-4.fc40.noarch
python3-pygdbmi-0.11.0.0-3.fc40.noarch
python3-pysocks-1.7.1-22.fc40.noarch
python3-urllib3-1.26.19-1.fc40.noarch
python3-urllib3+socks-1.26.19-1.fc40.noarch
python3-sentry-sdk-1.45.0-1.fc40.noarch
python3-requests-2.31.0-3.fc40.noarch
python3-pyxdg-0.27-11.fc40.noarch
python3-pyyaml-6.0.1-14.fc40.x86_64
python3-setuptools-69.0.3-3.fc40.noarch
python3-setools-4.5.1-2.fc40.x86_64
python3-policycoreutils-3.6-3.fc40.noarch
policycoreutils-python-utils-3.6-3.fc40.noarch
python3-simpleaudio-1.0.4-13.fc40.x86_64
python3-six-1.16.0-14.fc40.noarch
python3-dateutil-2.8.2-13.fc40.noarch
python3-botocore-1.34.135-1.fc40.noarch
python3-s3transfer-0.10.1-1.fc40.noarch
python3-boto3-1.34.135-1.fc40.noarch
ibus-anthy-python-1.5.16-6.fc40.noarch
python3-evdev-1.6.1-3.fc40.x86_64
python3-typing-extensions-4.9.0-3.fc40.noarch
python3-dns-2.6.1-1.fc40.noarch
python3-email-validator-2.2.0-2.fc40.noarch
python3-annotated-types-0.7.0-1.fc40.noarch
python3-xlib-0.33-6.fc40.noarch
python3-websocket-client-1.3.3-7.fc40.noarch
python3-soupsieve-2.5-3.fc40.noarch
python3-requests-file-2.0.0-2.fc40.noarch
python3-pydbus-0.6.0-25.fc40.noarch
python3-pidfile-3.0.0-8.fc40.noarch
python3-pefile-2023.2.7-7.fc40.noarch
python3-filelock-3.13.1-1.fc40.noarch
python3-tldextract-3.5.0-3.fc40.noarch
python3-dasbus-1.7-6.fc40.noarch
python3-configobj-5.0.8-8.fc40.noarch
python3-icoextract-0.1.4-8.fc40.noarch
python3-pip-23.3.2-1.fc40.noarch
python3-lxml-5.1.0-7.fc40.x86_64
python3-beautifulsoup4-4.12.3-3.fc40.noarch
python3-setproctitle-1.2.3-7.fc40.x86_64
python3-systemd-235-9.fc40.x86_64
python3-rpm-4.19.1.1-1.fc40.x86_64
python3-xapps-overrides-2.8.4-1.fc40.x86_64
python3-libxml2-2.12.8-1.fc40.x86_64
python3-pydantic-core-2.18.4-3.fc40.x86_64
python3-pydantic+email-2.7.4-1.fc40.noarch
python3-pydantic-2.7.4-1.fc40.noarch
python3-matplotlib-data-fonts-3.8.4-1.fc40.noarch
python3-matplotlib-data-3.8.4-1.fc40.noarch
python-srpm-macros-3.12-8.fc40.noarch
python3-3.12.4-1.fc40.i686
python3-libs-3.12.4-1.fc40.i686
python3-numpy-1.26.4-3.fc40.x86_64
python3-contourpy-1.2.0-3.fc40.x86_64
python3-devel-3.12.4-1.fc40.x86_64
python3-numpy-f2py-1.26.4-3.fc40.x86_64
python3-moddb-0.11.0-1.fc40.noarch
python3-pillow-tk-10.3.0-1.fc40.x86_64
python3-appdirs-1.4.4-13.fc40.noarch
python3-fs-2.4.16-7.fc40.noarch
python3-brotli-1.1.0-3.fc40.x86_64
python3-cycler-0.11.0-11.fc40.noarch
python3-kiwisolver-1.4.5-3.fc40.x86_64
python3-platformdirs-3.11.0-3.fc40.noarch
python3-pooch-1.8.2-2.fc40.noarch
python3-scipy-1.11.3-6.fc40.x86_64
python3-fonttools-4.50.0-1.fc40.x86_64
python3-protobuf-3.19.6-8.fc40.x86_64
python3-pyparsing-3.1.2-2.fc40.noarch
python3-matplotlib-tk-3.8.4-1.fc40.x86_64
python3-matplotlib-3.8.4-1.fc40.x86_64
python3-pypresence-4.3.0-4.fc40.noarch
python3-vdf-3.4-14.fc40.noarch
python3-websockets-12.0-3.fc40.x86_64
python3-pyudev-0.24.1-7.fc40.noarch
python3-pyclip-0.7.0-6.fc40.noarch
python3-gbinder-1.1.2-4.fc40.x86_64
python3-sniffio-1.3.0-3.fc40.noarch
python3-anyio-3.7.1-3.fc40.noarch
python3-starlette-0.37.2-4.fc40.noarch
python3-fastapi-0.110.3-2.fc40.noarch
python3-pyusb-1.2.1-9.fc40.noarch
python3-i2c-tools-4.3-10.fc40.x86_64
python3-h11-0.14.0-3.fc40.noarch
python3-uvicorn-0.23.2-1.fc40.noarch
python3-docopt-0.6.2-29.fc40.noarch
python3-crcmod-1.7-10.fc40.x86_64
python3-colorlog-6.8.2-1.fc40.noarch
python3-hidapi-0.14.0-7.fc40.x86_64
python3-liquidctl-1.13.0-4.fc40.noarch
python3-libvirt-10.1.0-1.fc40.x86_64
python3-argcomplete-3.3.0-2.fc40.noarch

Output of rpm-ostree status

State: idle
Deployments:
● ostree-unverified-registry:ghcr.io/ublue-os/bazzite-nvidia:stable
                   Digest: sha256:ccd21209fbae5c0ef0360ab4b27b47908468b7eb6d8b1a5e1a959efc0b58cfc9
                  Version: 40.20240706.0 (2024-07-06T07:12:35Z)
          LayeredPackages: coolercontrol edk2-ovmf kvantum liquidctl qemu virt-manager
                Initramfs: regenerate

Hardware

Output of cat /sys/devices/virtual/dmi/id/product_name: Victus by HP Gaming Laptop 16-s0xxx Output of Fastfetch:

                                            aditya@fedora
     %%%%%%====%%%%%%%%%%                
   %%%%%%%%    %%%%%%%%%%%%%%             󱋩  bazzite-nvidia:stable 
  %%%%%%%%%    %%%%%%%%%%%%%%%%           󰣛  Fedora Linux 40 (Kinoite) x86_64
  %%%%%%%%%    %%%%%%%%%%%%%%%###           Linux 6.9.7-201.fsync.fc40.x86_64
  %%%%%%%%%    %%%%%%%%%%%%%######        󰅐  2 hours, 47 mins
  ==                  =======######       󰔠  Spawned on Jul 06 2024
  ==                  =========#####     
  %%%%%%%%%    %%%%%%%####======#####     󰾰  Victus by HP Gaming Laptop 16-s0xxx
  %%%%%%%%%    %%%%%#######=====#####     󰻠  AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16) @ 5.14 GHz
  %%%%%%%%%    %%%#########=====#####     󰍛  NVIDIA GeForce RTX 3050 6GB Laptop GPU [Discrete]
  %%%%%%%%%    %%##########=====#####     󰍛  AMD Radeon 780M @ 0.80 GHz [Integrated]
  %%%%%%%%%====###########=====######       5.28 GiB / 14.90 GiB (35%)
   %%%%%%%%====#########======######        132.28 GiB / 475.35 GiB (28%) - btrfs [Read-only]
    %%%%%%%=====#####========######       󰍹  1920x1080 @ 60Hz [Built-in]
     %%%%###===============#######          100% [AC Connected]
      %#######==========#########        
        #######################           󰕮  KDE Plasma 6.1.1
          ###################               KWin (Wayland)
              ###########                   bash 5.2.26
                                            ptyxis-agent
                                          󰏖  2954 (rpm), 42 (flatpak-system), 117 (flatpak-user)

                                           ● ● ● ● ● ● ● ●

Extra information or context

Using pip list returns:

Package               Version
--------------------- ---------
annotated-types       0.7.0
anyio                 3.7.1
appdirs               1.4.4
argcomplete           3.3.0
beautifulsoup4        4.12.3
boto3                 1.34.135
botocore              1.34.135
Brlapi                0.8.5
Brotli                1.1.0
certifi               2023.5.7
charset-normalizer    3.3.2
click                 8.1.7
cockpit               320
colorlog              6.8.2
configobj             5.0.8
contourpy             1.2.0
coolercontrol_liqctld 1.3.0
crcmod                1.7
cupshelpers           1.0
cycler                0.11.0
dasbus                1.7
dbus-python           1.3.2
discover-overlay      0.7.2
distro                1.9.0
dnspython             2.6.1
docopt                0.6.2
email_validator       2.2.0
evdev                 1.6.1
fastapi               0.110.3
fedora-third-party    0.10
file-magic            0.4.0
filelock              3.13.1
fonttools             4.50.0
fros                  1.1
fs                    2.4.16
gbinder-python        1.1.2
gbulb                 0.6.5
h11                   0.14.0
hidapi                0.14.0
icoextract            0.1.4
idna                  3.7
input-remapper        2.0.1
inquirerpy            0.3.4
jmespath              1.0.1
joystickwake          0.4.2
kiwisolver            1.4.5
langtable             0.0.67
libvirt-python        10.1.0
liquidctl             1.13.0
louis                 3.28.0
lutris                0.5.17
lxml                  5.1.0
markdown-it-py        3.0.0
matplotlib            3.8.4
mdurl                 0.1.2
moddb                 0.11.0
nftables              0.1
numpy                 1.26.4
olefile               0.47
packaging             23.2
pefile                2023.2.7
pexpect               4.9.0
pfzy                  0.3.4
pillow                10.3.0
pip                   24.1.1
platformdirs          3.11.0
pooch                 1.8.2
prompt_toolkit        3.0.47
protobuf              3.19.6
protontricks          1.11.1
psutil                5.9.8
ptyprocess            0.7.0
pycairo               1.25.1
pyclip                0.7.0
pycups                2.0.4
pydantic              1.10.2
pydantic_core         2.18.4
pydbus                0.6.0
pyenchant             3.2.2
pygdbmi               0.11.0.0
Pygments              2.18.0
PyGObject             3.48.2
pyparsing             3.1.2
pypresence            4.3.0
PySocks               1.7.1
python-dateutil       2.8.2
python-pidfile        3.0.0
python-xlib           0.33
pyudev                0.24.1
pyusb                 1.2.1
pyxdg                 0.27
PyYAML                6.0.1
regex                 2024.4.16
requests              2.31.0
requests-file         2.0.0
rich                  13.7.1
rpm                   4.19.1.1
s3transfer            0.10.1
SciPy                 1.11.3
selinux               3.6
sentry-sdk            1.45.0
sepolicy              3.6
setools               4.5.1
setproctitle          1.2.3
setroubleshoot        3.3.33
setuptools            69.0.3
simpleaudio           1.0.4
six                   1.16.0
smbus                 1.1
sniffio               1.3.0
sos                   4.7.2
soupsieve             2.5
starlette             0.37.2
systemd-python        235
tldextract            3.5.0
topgrade              14.0.1
tqdm                  4.66.4
typer                 0.9.4
typing_extensions     4.9.0
ublue_update          1.0.0
udica                 0.2.8
urllib3               1.26.19
uvicorn               0.23.2
vdf                   3.4
wcwidth               0.2.13
websocket-client      1.3.3
websockets            12.0
yafti                 0.8.0

On trying to remove the package typer it gives the error:

aditya@fedora:~$ pip uninstall typer
Found existing installation: typer 0.9.4
Uninstalling typer-0.9.4:
  Would remove:
    /usr/lib/python3.12/site-packages/typer-0.9.4.dist-info/*
    /usr/lib/python3.12/site-packages/typer/*
Proceed (Y/n)? y
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib64/python3.12/shutil.py", line 847, in move
    os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/usr/lib/python3.12/site-packages/typer-0.9.4.dist-info/' -> '/tmp/pip-uninstall-daw3943m'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/aditya/.local/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 179, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/home/aditya/.local/lib/python3.12/site-packages/pip/_internal/commands/uninstall.py", line 106, in run
    uninstall_pathset = req.uninstall(
                        ^^^^^^^^^^^^^^
  File "/home/aditya/.local/lib/python3.12/site-packages/pip/_internal/req/req_install.py", line 722, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "/home/aditya/.local/lib/python3.12/site-packages/pip/_internal/req/req_uninstall.py", line 370, in remove
    moved.stash(path)
  File "/home/aditya/.local/lib/python3.12/site-packages/pip/_internal/req/req_uninstall.py", line 261, in stash
    renames(path, new_path)
  File "/home/aditya/.local/lib/python3.12/site-packages/pip/_internal/utils/misc.py", line 356, in renames
    shutil.move(old, new)
  File "/usr/lib64/python3.12/shutil.py", line 865, in move
    rmtree(src)
  File "/usr/lib64/python3.12/shutil.py", line 759, in rmtree
    _rmtree_safe_fd(stack, onexc)
  File "/usr/lib64/python3.12/shutil.py", line 703, in _rmtree_safe_fd
    onexc(func, path, err)
  File "/usr/lib64/python3.12/shutil.py", line 700, in _rmtree_safe_fd
    onexc(os.unlink, fullname, err)
  File "/usr/lib64/python3.12/shutil.py", line 698, in _rmtree_safe_fd
    os.unlink(entry.name, dir_fd=topfd)
OSError: [Errno 30] Read-only file system: '/usr/lib/python3.12/site-packages/typer-0.9.4.dist-info/'

Searching in the Fedora Official repositories shows the version as python3-typer-0.11.1-1.fc40 but on running rpm-ostree search python3-typer-0.11.1-1.fc40 doesnt show the package.

Indoroid commented 1 month ago

Sorry I forgot to add the bug flair by mistake

KyleGospo commented 1 month ago

Latest release should have this fixed. Please note that layering is a last resort and we recommend that you use distrobox if able.

Indoroid commented 1 month ago

Could you please guide me how can I rebase to the latest image

KyleGospo commented 1 month ago

Could you please guide me how can I rebase to the latest image

ujust update

tmgast commented 1 month ago

ujust update results in this error

KyleGospo commented 1 month ago

ujust update results in this error

You may need to remove some of the packages you've layered and then re-add them after you update

Grab the list with rpm-ostree status and then remove what you've changed with rpm-ostree reset. Once that's done update, and then install your packages from the first status command again.

tmgast commented 1 month ago

I didn't have anything different between the layered package list, but rpm-ostree reset did end up allowing me to run ujust update without error.

HikariKnight commented 1 month ago

I didn't have anything different between the layered package list, but rpm-ostree reset did end up allowing me to run ujust update without error.

ideally this line would not exist in rpm-ostree status LayeredPackages: coolercontrol edk2-ovmf kvantum liquidctl qemu virt-manager as any layered package can cause issues when updating. It is also why we try avoid layering even with our ujusts if we can.

rpm-ostree reset will remove the layered packages so you can update, however this means you will have to manually layer them again after the update that caused the conflict if you still need them.