Can't use snap to open any application on CentOS 7

Hello. I am using CentOS 7 and downloaded snapd using yum. I tried reinstalling it and lib2. SELinux kept on saying something about snapd every once in a while, but running setenforce 0 didn’t change anything. Here are some (maybe) useful info: The error I get whenever I try to run ANY app withsudo snap run <anyapp>:

`20:38:41:0052 GLib file ../src/glib/gthread-posix.c: line 1234 (g_system_thread_new): error 'Operation not permitted' during 'pthread_create'`

Output of snap version:

snap    2.58.3-1.el7
snapd   2.58.3-1.el7
series  16
centos  7
kernel  3.10.0-1160.92.1.el7.x86_64

Output of pkg-config --modversion glib-2.0:


journalctl -xe (relevant part):

Jul 02 23:00:42 nasty.local sudo[23109]: root : TTY=pts/0 ; PWD=/home/alvin ; USER=root ; COMMAND=/bin/snap run snap-store

Jul 02 23:00:42 nasty.local sudo[23109]: pam_unix(sudo:session): session opened for user root by alvin(uid=0)

Jul 02 23:00:42 nasty.local systemd[1]: Started snap.snap-store.snap-store.a9f97308-c748-4e01-a464-4a5c74f3cffd.scope. – Subject: Unit snap.snap-store.snap-store.a9f97308-c748-4e01-a464-4a5c74f3cffd.scope has finished start-up – Defined-By: systemd – Support:

– Unit snap.snap-store.snap-store.a9f97308-c748-4e01-a464-4a5c74f3cffd.scope has finished starting up.

– The start-up result is done. Jul 02 23:00:42 nasty.local kernel: traps: snap-store[23112] trap int3 ip:7f7270cc86ff sp:7ffdb05faf90 error:0 in[7f7270c7b000+ad000]

Jul 02 23:00:42 nasty.local abrt-hook-ccpp[23173]: Process 23112 (snap-store) of user 0 killed by SIGTRAP - dumping core

Jul 02 23:00:42 nasty.local sudo[23109]: pam_unix(sudo:session): session closed for user root

Jul 02 23:00:42 nasty.local abrt-server[23178]: Executable ‘/snap/snap-store/959/usr/bin/snap-store’ doesn’t belong to any package and ProcessUnpackaged is set to ‘no’

Jul 02 23:00:42 nasty.local abrt-server[23178]: ‘post-create’ on ‘/var/spool/abrt/ccpp-2023-07-02-23:00:42-23112’ exited with 1

Jul 02 23:00:42 nasty.local abrt-server[23178]: Deleting problem directory ‘/var/spool/abrt/ccpp-2023-07-02-23:00:42-23112’

I’ve searched the whole internet for this, and I’m out of ideas. What do you guys recon I could try? Thanks in advance! Alvin

Hi m0ment,

Did you follow these instructions?

and “Either log out and back in again or restart your system to ensure snap’s paths are updated correctly”

Perhaps first try to run the most basic snap before running a specific snap with more challenging dependencies.

along with what @ernestl said, please do not run gui applications as root or with sudo … the snap-store is designed to be used as a normal user and will elevate privileges as needed using policykit …