I tried to ./run the anki, but fails with the following error:
~/ $ git clone https://github.com/ankitects/anki.git
~/ $ cd anki
~/anki (main)$ git checkout refs/tags/24.04.1
~/anki ((24.04.1))$ ./run
...
Finished release [optimized] target(s) in 0.19s
thread 'main' panicked at build/runner/src/build.rs:82:39:
ninja not installed: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
~/anki ((24.04.1))$ ninja
ninja: error: loading 'build.ninja': No such file or directory
It seems the ninja command has failed to find the build.ninja file. How to find or generate it?
You must use ./ninja or ./run. The error in your original post implies that the ninja or n2 binary is not in the PATH when running bash, which is what ./ninja / ./run uses.
Hmm. ./ninja is available but fails with the same error. I also explicitly added the source directory to $PATH, but it does not help.
$ ./ninja
Finished release [optimized] target(s) in 0.14s
thread 'main' panicked at build/runner/src/build.rs:78:39:
ninja not installed: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace