I’ve been wanting to use anki for a while but can’t seem to get it to install properly on ChromeOS using linux.
I followed the instructions on the getting started guide and it all worked, until I was prompted to start anki. I typed ‘anki’ into my terminal, which (the first time) gave me a long list of things followed by “Press enter to start”, which I did. However, this did not start the program. I think this is because I pressed enter at the wrong time and left a blank line where there should not have been one (screenshot 1). I typed anki again only to be met with purple text ending in being unable to open it due to “no such file or directory” (screenshot 2).
The same purple text has appeared no matter what I try: I even tried deleting the file from my computer and trying again from the start. I restarted my computer, but the truth is that I know nothing about Linux and so I’m totally improvising here. If anyone can give an idea of what I need to do to fix this, I’d be very grateful!
I have checked and have done all the steps on the install for Linux guide, I just genuinely don’t know what I’ve done wrong and don’t know enough about Linux to fix it.
Unlikely. Pressing enter when a program prints to stdout is usually no issue.
It is telling you that you’re missing a library (libatomic.so). In debian and debian based systems you could run dpkg -S libatomic.so, which will show you what package you have to install to get that dependency.
With that being said: ChromeOS seems to have issues when you run Anki in a non-flatpak environment. I’d highly recommend you to install flatpak and download anki from there.
Thanks! I’ve given flatpak a go and it’s now telling me that I have an issue with the Wayland compositor, and that the Wayland connection broke. It allows me to select a language and then promptly crashes, but I’m one step further than I was.
For what it’s worth, if I did want to install extra packages, what’s the best way to do it?
I found a guide which might help further: Installing Anki on a Chromebook. I never used linux inside of ChromeOS though, only “standard” linux (mostly Debian).
Running the anki flatpak via terminal could help identify the issue.
But it seems to be just like any other debian distro. E.g. to resolve the libatomic.so issue you had from above, you’d run something along the lines of this:
Thank you again! This has also got me one step further. I’ve installed the missing library on the regular version, which now gets me to the same point as the flatpak version: ie. language selection then crashing.
Yes - it is similar to the issue you’ve linked above, but I’ve tried forcing the Wayland as this is also suggested in the manual. This doesn’t seem to be the issue as it’s simply returning the same issue on both:
Qt warning: Ignoring unexpected wl_surface.enter received for output with id: 7 screen name: “Screen5” screen model: “unknown” This is most likely a bug in the compositor.
Qt warning: The Wayland connection broke. Did the Wayland compositor die?
The second message appears after the small window appears for a moment. I can select a language on the screen but as soon as I press ‘next’ it crashes.
I just tried the blogger article you sent and it got me to the exact same position. As I’m totally clueless on all of these different components, do you know what the issue is with the Wayland compositor?
Interesting. So you are getting a qt window which works fine but once you try to set the language you get a crash? Maybe a dev sees this and has an idea why that might happen.
Unfortunatly, I do not know. Though from what I’ve read, ChromeOS only supports wayland. Anki uses x11 though due to some issues, see the topic I linked above.
I assumed flatpak would install x11 dependencies though, so not sure why that didn’t solve the issue.
I am the user from the other linked thread with the same problem (after update rather than new install). First, I note for developers that sometimes the actual Anki window showed up for a splitsecond before the crash.
Second, for @kdj : I know that Anki version 25.02.7 still works (Edit: nope it doesn’t). I assume you can install an old version using Flatpak and then prevent auto updates. So maybe you can find out how to do that and make that work.
Edit: Downgrading the Flatpak doesn’t work. I downgraded to 25.02.4 seemingly successfully but still get the same error with the broken Wayland connection. That’s interesting as 25.02.5 was running for me perfectly until I decided to update.
Alternatively, you can install Ankidroid from the Play Store. This works fine as well but the user interface is a bit different and you can’t use add-ons.
I just wanted to confirm that the issue is still present in the current Anki version (there were also some Chromebook updates and updates for the Linux systems). I updated the flatpak and now have Anki 25.09 (confirmed by “Starting Anki 25.09”). The window for the language selection still gets shown but then the program still crashes with the same error message (“Qt warning: The Wayland connection broke. Did the Wayland compositor die?”).
Just to make sure there is no issue with Flatpak, I uninstalled Flatpak Anki and installed (or run) the 25.09 version for Linux from the website. (It still says “Starting Anki 25.07.5” so maybe this is still the old version.) Apparently my user credentials are still stored somewhere as instead of the language selection window, I get a window reporting a conflict between Ankiweb and the local data. Selecting “download from Ankiweb” however then results in the Wayland crash.
I now also removed the Anki user data in the two Anki folders in ~/.local. When I run Anki now from the folder where it was untarred to (without running install.sh), I get the new text based launchers and it downloads and installs Anki. When I start it now, the version is “Starting Anki 25.09.2”. It then shows the language selection window and after I select the language, it again crashes with the above Wayland error.