# Help needed installing anki on xubuntu \[linux\]

**URL:** https://forums.ankiweb.net/t/help-needed-installing-anki-on-xubuntu-linux/42764
**Category:** Help
**Created:** [March 24, 2024, 3:14pm UTC](https://forums.ankiweb.net/t/help-needed-installing-anki-on-xubuntu-linux/42764 "2024-03-24T15:14:35Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![tracker](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tracker](https://forums.ankiweb.net/u/tracker)
#### Post date: [March 24, 2024, 3:14pm UTC](https://forums.ankiweb.net/t/help-needed-installing-anki-on-xubuntu-linux/42764/1 "2024-03-24T15:14:35Z")

</div>

Hiya all,  
I’m on Xubuntu linux, trying to install [Qt6] Anki following the official instructions. Installs fine. When I go to launch it (from terminal), I get this:

> anki  
> Anki starting…  
> Initial setup…  
> Preparing to run…  
> File “”, line 1, in   
> File “aqt”, line 509, in run  
> File “aqt”, line 583, in \_run  
> File “aqt.profiles”, line 139, in setupMeta  
> File “aqt.profiles”, line 421, in \_loadMeta  
> resetting corrupt \_global  
> Qt warning: QGuiApplication::setDesktopFileName: the specified desktop file name ends with .desktop. For compatibility reasons, the .desktop suffix will be removed. Please specify a desktop file name without .desktop suffix  
> Qt warning: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.  
> Qt info: Could not load the Qt platform plugin “xcb” in “” even though it was found.  
> Qt fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.  
> Available platform plugins are: offscreen, wayland, wayland-egl, vkkhrdisplay, minimalegl, linuxfb, vnc, eglfs, minimal, xcb.

What should I do?  
Oh, and yes, I did do:

> sudo apt install libxcb-xinerama0 libxcb-cursor0 libnss3

Any help much appreciated.

---

<div class="post-metadata">

### Author: ![stupid](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/stupid/32/8890_2.png) [@stupid](https://forums.ankiweb.net/u/stupid)
#### Post date: [March 24, 2024, 4:15pm UTC](https://forums.ankiweb.net/t/help-needed-installing-anki-on-xubuntu-linux/42764/2 "2024-03-24T16:15:37Z")

</div>

> [@tracker](#):
>
> Qt info: Could not load the Qt platform plugin “xcb” in “” even though it was found.

This is the important part.

I’m guessing that you’re using xfce because you’re on Xubuntu. I searched for xfce and found a user with the same error as above, but on Debian: [Anki 23.12.1 fail to start in Debian 12](https://forums.ankiweb.net/t/anki-23-12-1-fail-to-start-in-debian-12/42129)

[Dae](https://forums.ankiweb.net/u/dae) linked to this page: [Missing Libraries - Anki Manual](https://docs.ankiweb.net/platform/linux/missing-libraries.html). It says to launch with `QT_DEBUG_PLUGINS=1 anki` to add debug output in order to see which library is missing.

In that user’s case, dae saw that `libxcb-icccm.so.4` was missing via the end of the last line starting with `Qt debug:`

> [@Anki 23.12.1 fail to start in Debian 12](https://forums.ankiweb.net/t/anki-23-12-1-fail-to-start-in-debian-12/42129/4):
>
> ```auto
> Qt debug: QLibraryPrivate::loadPlugin failed on "/usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)" 
> 
> ```

and a search for the required package gave `libxcb-icccm4`:

> [@Anki 23.12.1 fail to start in Debian 12](https://forums.ankiweb.net/t/anki-23-12-1-fail-to-start-in-debian-12/42129/5):
>
> ```auto
> % apt search libxcb-icccm     
> Sorting... Done
> Full Text Search... Done
> libxcb-icccm4/stable,stable,now 0.4.1-1.1 amd64 [installed]
> utility libraries for X C Binding -- icccm
> 
> ```

I’d still try to follow those steps instead of going straight to installing the package. Try to find a similar error message using `QT_DEBUG_PLUGINS=1 anki` and then find out what package provides/owns the missing library.

In case the `apt search` command shown above doesn’t work for you, I did a few searches. On my OS, the search I’d use is ~~`pacman -Qo <missing-library>`~~ `pacman -F <missing-library>` to find which package owns it. This page gives the equivalent in Debian/Ubuntu: [pacman/Rosetta - ArchWiki](https://wiki.archlinux.org/title/Pacman/Rosetta)

> **pacman -Qo equivalents likely incorrect in this case, see edit below**
>
> ```bash
> dpkg -S <missing-library>
> 
> ```
> 
> OR
> 
> ```bash
> dlocate <missing-library>
> 
> ```

Edit: I tested. `libxcb-icccm.so.4` showed up by using `pacman -F`, not `pacman -Qo`. So the command in that case would be:

```bash
apt-file search <missing-library>

```

Man pages:  
[dpkg](https://manpages.ubuntu.com/manpages/noble/en/man1/dpkg.1.html)  
[dlocate](https://manpages.ubuntu.com/manpages/noble/en/man1/dlocate.1.html)  
[apt-file](https://manpages.ubuntu.com/manpages/noble/man1/apt-file.1.html)

---

<div class="post-metadata">

### Author: ![tracker](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tracker](https://forums.ankiweb.net/u/tracker)
#### Post date: [March 24, 2024, 7:32pm UTC](https://forums.ankiweb.net/t/help-needed-installing-anki-on-xubuntu-linux/42764/3 "2024-03-24T19:32:00Z")

</div>

Thanks for the reply.  
So, I ran `QT_DEBUG_PLUGINS=1 anki` and got this:

> Qt debug: Got keys from plugin meta data QList(“xcb”)  
> Qt debug: checking directory path “/usr/local/share/anki/platforms” …  
> Qt debug: “/usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so” cannot load: Cannot load library /usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)  
> Qt debug: QLibraryPrivate::loadPlugin failed on “/usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so” : “Cannot load library /usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)”  
> Qt warning: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.  
> Qt info: Could not load the Qt platform plugin “xcb” in “” even though it was found.  
> Qt fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

I’ve tried searching for `libxkbcommon-x11.so.0` without luck, though I don’t really know what I’m doing.  
What should I do next?

---

<div class="post-metadata">

### Author: ![stupid](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/stupid/32/8890_2.png) [@stupid](https://forums.ankiweb.net/u/stupid)
#### Post date: [March 24, 2024, 7:44pm UTC](https://forums.ankiweb.net/t/help-needed-installing-anki-on-xubuntu-linux/42764/4 "2024-03-24T19:44:54Z")

</div>

The [Xubuntu releases page](https://xubuntu.org/releases/) has two versions listed, Mantic (23.10) and Jammy (22.04). But I think what version you have doesn’t matter in this case.

Using Ubuntu’s [package search](https://packages.ubuntu.com), I found `libxkbcommon-x11.so.0` in the ` libxkbcommon-x11-0` package for both.

- Results for Mantic: [Ubuntu – Package Contents Search Results -- libxkbcommon-x11.so.0](https://packages.ubuntu.com/search?searchon=contents&keywords=libxkbcommon-x11.so.0&mode=filename&suite=mantic&arch=any)
- Results for Jammy: [Ubuntu – Package Contents Search Results -- libxkbcommon-x11.so.0](https://packages.ubuntu.com/search?searchon=contents&keywords=libxkbcommon-x11.so.0&mode=filename&suite=jammy&arch=any)

This command should install it for you:  
`sudo apt install libxkbcommon-x11-0`

And hopefully Anki should start after that.

---

<div class="post-metadata">

### Author: ![tracker](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tracker](https://forums.ankiweb.net/u/tracker)
#### Post date: [March 25, 2024, 12:57pm UTC](https://forums.ankiweb.net/t/help-needed-installing-anki-on-xubuntu-linux/42764/5 "2024-03-25T12:57:16Z")

</div>

Hi again,  
Thanks, I installed `libxkbcommon-x11-0`, but anki still won’t run.  
Here’s the output from `QT_DEBUG_PLUGINS=1 anki` now:

> Qt debug: Got keys from plugin meta data QList(“xcb”)  
> Qt debug: checking directory path “/usr/local/share/anki/platforms” …  
> Qt debug: “/usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so” cannot load: Cannot load library /usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)  
> Qt debug: QLibraryPrivate::loadPlugin failed on “/usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so” : “Cannot load library /usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)”  
> Qt warning: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.  
> Qt info: Could not load the Qt platform plugin “xcb” in “” even though it was found.  
> Qt fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

I’m afraid I need to ask for more help. I’ve tried searching that ubuntu packages list, without much success.  
Oh, and I’m on Xubuntu 22.04.

---

<div class="post-metadata">

### Author: ![stupid](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/stupid/32/8890_2.png) [@stupid](https://forums.ankiweb.net/u/stupid)
#### Post date: [March 25, 2024, 1:12pm UTC](https://forums.ankiweb.net/t/help-needed-installing-anki-on-xubuntu-linux/42764/6 "2024-03-25T13:12:23Z")

</div>

> [@tracker](#):
>
> I’ve tried searching that ubuntu packages list, without much success.

It’s the second search field available since we’re searching for package contents. I should’ve made that more clear. Here’s a picture of my search on [that search page](https://packages.ubuntu.com):

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/5/0/508826aa8f12c9978531a6fba72a89a4e5db002a.png)

I selected Jammy since you’re on 22.04. Results page: [Ubuntu – Package Contents Search Results -- libxcb-icccm.so.4](https://packages.ubuntu.com/search?searchon=contents&keywords=libxcb-icccm.so.4&mode=filename&suite=jammy&arch=any)

The next package to install is `libxcb-icccm4`.

---

<div class="post-metadata">

### Author: ![tracker](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tracker](https://forums.ankiweb.net/u/tracker)
#### Post date: [March 25, 2024, 4:28pm UTC](https://forums.ankiweb.net/t/help-needed-installing-anki-on-xubuntu-linux/42764/7 "2024-03-25T16:28:45Z")

</div>

Ok, I installed `libxcb-icccm4`, still problems launching. Then I repeated `QT_DEBUG_PLUGINS=1 anki`, and successfully searched for `libxcb-keysyms.so.1`, found and installed `libxcb-keysyms1`.  
Success! Anki is now launching and running fine, I’ve downloaded all my cards and can verify that everything is working as it should.

Arigato @stupid, you’ve been extremely helpful and prompt. Couldn’t have done it without your help.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)
#### Post date: [April 24, 2024, 4:29pm UTC](https://forums.ankiweb.net/t/help-needed-installing-anki-on-xubuntu-linux/42764/8 "2024-04-24T16:29:06Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
