sergei-mironov / xkb-switch

Switch your X keyboard layouts from the command line
MIT License
353 stars 40 forks source link

Error while loading shared libraries #65

Closed sarmong closed 2 years ago

sarmong commented 2 years ago

I am getting the following error on Ubuntu 20.04 when running the command

xkb-switch: error while loading shared libraries: libxkbswitch.so.1: cannot open shared object file: No such file or directory
sergei-mironov commented 2 years ago

I know that Ubuntu 20.04 may use Wayland (depends on configuration). Wayland is not currently supported in xkb-switch, see #64 Is it your case?

sarmong commented 2 years ago

That was X11. However, I don't have that Ubuntu installation anymore and there is no issue right now, so I'm closing the issue

sergei-mironov commented 2 years ago

Ok, fine. For those who run into this again: I think the next step should be running ldd $(which xkb-switch) and trying to figure out what is happening

synalice commented 2 years ago

Ok, fine. For those who run into this again: I think the next step should be running ldd $(which xkb-switch) and trying to figure out what is happening

I have exactly that error. Running Fedora 36. Output of ldd $(which xkb-switch):

    linux-vdso.so.1 (0x00007ffd0bdc2000)
    libxkbswitch.so.1 => not found
    libX11.so.6 => /lib64/libX11.so.6 (0x00007ff120a0e000)
    libxkbfile.so.1 => /lib64/libxkbfile.so.1 (0x00007ff1209e4000)
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007ff1207b0000)
    libm.so.6 => /lib64/libm.so.6 (0x00007ff1206d2000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff1206b2000)
    libc.so.6 => /lib64/libc.so.6 (0x00007ff1204ae000)
    libxcb.so.1 => /lib64/libxcb.so.1 (0x00007ff120482000)
    /lib64/ld-linux-x86-64.so.2 (0x00007ff120b71000)
    libXau.so.6 => /lib64/libXau.so.6 (0x00007ff12047c000)
synalice commented 2 years ago

Solved it by just installing it from Fedora's package repository sudo dnf install xkb-switch :woozy_face:

kqvanity commented 2 years ago

I've already had a successful compilation with the respective library directories and files placed accordingly. I had to provide the library file's linker name using sudo ldconfig /usr/local/lib/libxkbswitch.so.1 to getnot found gap filled up