Return to

Snapd and gnome-software broken in Fedora 31!

I am unable to install snapd in Fedora 31.

I am able to install other packages; however, gnome-software only works halfway: I can load some items from the store but the updates page loads forever unless I run gnome-software as root.

sudo dnf install snapd fails to install the package:

Last metadata expiration check: 0:38:56 ago on Sun 12 Jan 2020 09:25:58 PM EST.
    Dependencies resolved.
     Package                      Architecture           Version                         Repository               Size
     snapd                        x86_64                 2.42.2-1.fc31                   updates                  16 M
    Installing dependencies:
     snap-confine                 x86_64                 2.42.2-1.fc31                   updates                 2.4 M

    Transaction Summary
    Install  2 Packages

    Total download size: 18 M
    Installed size: 70 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/2): snap-confine-2.42.2-1.fc31.x86_64.rpm                                       2.4 MB/s | 2.4 MB     00:01    
    (2/2): snapd-2.42.2-1.fc31.x86_64.rpm                                              7.4 MB/s |  16 MB     00:02    
    Total                                                                              6.4 MB/s |  18 MB     00:02     
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                                                           1/1 
      Installing       : snap-confine-2.42.2-1.fc31.x86_64                                                         1/2 
    error: lsetfilecon: (/usr/libexec/snapd/snap-confine;5e1bde62, system_u:object_r:snappy_confine_exec_t:s0) Invalid argument
    error: Plugin selinux: hook fsm_file_prepare failed

    Error unpacking rpm package snap-confine-2.42.2-1.fc31.x86_64
      Installing       : snapd-2.42.2-1.fc31.x86_64                                                                2/2 
    error: unpacking of archive failed on file /usr/libexec/snapd/snap-confine;5e1bde62: cpio: (error 0x2)
    error: snap-confine-2.42.2-1.fc31.x86_64: install failed
    error: lsetfilecon: (/etc/sysconfig/snapd;5e1bde62, system_u:object_r:snappy_config_t:s0) Invalid argument
    error: Plugin selinux: hook fsm_file_prepare failed

    Error unpacking rpm package snapd-2.42.2-1.fc31.x86_64
      Verifying        : snap-confine-2.42.2-1.fc31.x86_64                                                         1/2 
      Verifying        : snapd-2.42.2-1.fc31.x86_64                                                                2/2 

      snap-confine-2.42.2-1.fc31.x86_64                           snapd-2.42.2-1.fc31.x86_64                          

    Error: Transaction failed

I have tried reinstalling/downgrading gnome-software and fwupd, as well as tpm2-abrmd to no avail. I don’t know what to do anymore, any help is much appreciated!

The beaiviour look to me like a broken repo (official fedora repo should not have broken pkg), could you show your repolist ?

dnf repolist

maybe clean it with

dnf clean all


dnf repolist

repo id                                             repo name
MEGAsync                                            MEGAsync             Copr repo for gwe owned by atim
fedora                                              Fedora 31 - x86_64
fedora-cisco-openh264                               Fedora 31 openh264 (From Cisco) - x86_64
fedora-modular                                      Fedora Modular 31 - x86_64
google-chrome                                       google-chrome
nordvpn                                             NordVPN YUM repository - x86_64
nordvpn-noarch                                      NordVPN YUM repository - noarch
packages-microsoft-com-prod                         packages-microsoft-com-prod
rpmfusion-free                                      RPM Fusion for Fedora 31 - Free
rpmfusion-free-updates                              RPM Fusion for Fedora 31 - Free - Updates
rpmfusion-nonfree                                   RPM Fusion for Fedora 31 - Nonfree
rpmfusion-nonfree-nvidia-driver                     RPM Fusion for Fedora 31 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam                             RPM Fusion for Fedora 31 - Nonfree - Steam
rpmfusion-nonfree-updates                           RPM Fusion for Fedora 31 - Nonfree - Updates
slack                                               slack
updates                                             Fedora 31 - x86_64 - Updates
updates-modular                                     Fedora Modular 31 - x86_64 - Updates

dnf clean all

0 files removed

sudo dnf clean all

120 files removed

Have you made any changes to the yum/dnf config files?

Can you post the output of:

while read -r WRONG_PERM; do
 echo "Possible permissions mismatch on ${WRONG_PERM}" >&2
done <<< "$(/usr/bin/rpm -Va | /usr/bin/awk '{ if (substr($0,2,1)=="M") print $NF }')"

while read -r WRONG_PERM; do
  echo "Possible ownership mismatch on ${WRONG_PERM}" >&2
done <<< "$(/usr/bin/rpm -Va | /usr/bin/awk '{ if (substr($0,6,1)=="U" || substr($0,7,1)=="G") print $NF }')"

Also, give the install a shot with selinux turned off if you haven’t already.

Well this is interesting. I removed the dnf repo I had from Microsoft (which I used to install Powershell) and removed powershell, and now everything is working again. I am able to install and use snap and gnome-software works again. I guess that was the issue.

1 Like

Probably better suited as a snap anyway.

1 Like