Search code examples
linuxwine

wine can only find libs with sudo


I have installed wine recently, but I can only run programs with wine using sudo.

/opt/wine-devel/bin/wine: error while loading shared libraries: libwine.so.1: cannot open shared object file: No such file or directory

It gives this error, I checked to see if wine was trying find the libs in the wrong dir, but isn't the case since if I use:

sudo wine program.exe

it runs correctly.


Solution

  • I solved the problem just doing a chown <user> /opt/wine-<branch>. But doesn't do it after has used the wine with sudo and installing some packages or programs, they will be yet unreachable locked by the permissions, use chown just after download wine from the winehq page.