[SOLVED] Wine error loading libpthread.so.0: permission error

Hi there,

I am trying to use a Windows application with wine. Having (sudo) dnf installed wine.i686 from the updates repo, I can get the correct version

$ wine --version
wine-6.16 (Staging)

But when I try to run winecfg, the following error occurs:

$ winecfg
/usr/bin/wine: error while loading shared libraries: libpthread.so.0: cannot create shared object descriptor: Permission denied


Run winecfg without sudo, i.e. prompt the winecfg window simply by issuing $ winecfg

Current behavior

As stated above, winecfg complains about failing to open libpthread.so due to permission problem.

Information maybe helpful

Remove the i686 version and install the x86_64 gives the same error

sudo winecfg can succesfully call out the winecfg window

Tried set vm.mmap_min_addr = 0, but the error persists.

$  ldd /usr/bin/wine                                                                                             
	linux-gate.so.1 (0x2a9a1000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x2a95c000)
	libdl.so.2 => /lib/libdl.so.2 (0x2a956000)
	libc.so.6 => /lib/libc.so.6 (0x2a796000)
	/lib/ld-linux.so.2 (0x2a9a3000)
$ uname -a
Linux myz-amd-fedora 5.13.13-200.fc34.x86_64 #1 SMP Thu Aug 26 17:06:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ ls -l /lib/libpthread.so.0                                                                                       
lrwxrwxrwx. 1 root root 18 Jul 12 22:36 /lib/libpthread.so.0 -> libpthread-2.33.so
$ ls -l /lib/libpthread-2.33.so                                                                                    
-rwxr-xr-x. 1 root root 151K Jul 12 22:38 /lib/libpthread-2.33.so

Any help will be very much appreciated!

Although marked as solved, I am still interested why the unlimited stack size causes the problem. Will be very glad to hear some idea.

1 Like

Check if the issue persists under a new user with default profile settings.

Hi Vladislav, thank you very much for the hint! I checked in a new standard user that winecfg indeed works. So I guess it is probably a problem of my bashrc/zshrc.

1 Like

The problem seems to be with the ulimit command:

ulimit -s unlimited

Comment it out solves the problem, thanks! By the way, do you happen to have some clue on it?