ubports / ubports-pdk

Platform Development Kit for Ubuntu Touch
GNU General Public License v3.0
39 stars 8 forks source link

Setup failed. run hook "configure": cannot query current apparmor profile: Invalid argument #22

Open Killfrra opened 3 years ago

Killfrra commented 3 years ago
Operating System: openSUSE Tumbleweed 20210806
Kernel Version: 5.3.18-57-default (64-bit)
AppArmor Version: 3.0.1-9.1

sudo snap install --beta ubports-pdk
sudo snap connect ubports-pdk:kvm
sudo snap connect ubports-pdk:network-control
sudo usermod -aG kvm $USER
ubports-pdk.pdk setup

results in

cannot query current apparmor profile: Invalid argument

and

git clone https://github.com/ubports/ubports-pdk
cd ubports-pdk
./ubuntu-touch-pdk setup

results in

#####################################
Ubuntu Touch Platform Development Kit
#####################################

Executing tasks:
        Setup? yes
        Clear cache? no
        List? no
        Pull image? no
        Run an image? no
which: no mtools in (/usr/local/bin:/usr/bin:/bin:/snap/bin)

WARNING: You haven't set up your environment yet. Continuing with setup...
Installing prerequisites
[sudo] password for root: 
error: cannot perform the following tasks:
- Run configure hook of "qemu-ut-pdk" snap if present (run hook "configure": cannot query current apparmor profile: Invalid argument)

Question: Is there any option for a more verbose output or the source of the qemu-ut-pdk snap?

fredldotme commented 3 years ago

Searching for the issue on the internet surfaces this: https://forum.manjaro.org/t/snaps-stopped-working-after-2020-12-30-update/45518/13

It's possible you need to upgrade your kernel to something newer, since this is a mismatch between snapd's AppArmor profile and the AppArmor support in the kernel.

Killfrra commented 3 years ago

For some reason I thought it was a PDK specific problem. Updating the kernel helped, but I still couldn't get the PDK to run on OpenSUSE, so I switched to Ubuntu. Perhaps the errors that have occurred are a topic for new issues, but this one can be considered closed, or renamed to something like "launching PDK on OpenSUSE"