[Bug] Problem with installing Leon in LXC containers
Specs
- Leon version: 7039918 (Downloaded with Git command from Github.)
- OS (or browser) version: Ubuntu 21.04 (Running in LXC Container on Proxmox Virtual Environment)
- Node.js version: 17.4.0, NPM Version: 8.3.1
- Complete "leon check" (or "npm run check") output:
root@LeonAI:/home/leon/leon# leon check
✔ Checking that the setup went well
[email protected] check babel-node scripts/run-check.js
.: CHECKING :.
[It's just that.]
- (if using Docker) Complete "npm run docker:check" output:
- (optional) Leon package version:
Expected Behavior
Leon should install dependencies with the new "leon create birth" command.
Actual Behavior
It throws out an error if I try to type "Y" on the CLI screen after I executed the leon create birth command, that asks to install dependencies for leon (see screenshot), but if I type "n" on that screen, it just proceeds and installs Leon. Leon does even start using "leon start" but if I try, for example, to type "hello" in the Web UI, it just says "Sorry, I have an issue with the "Greeting" module of my "Leon" package!". I tested multiple NPM and NodeJS versions, all with the same behaviour.
How Do We Reproduce?
Run Leon with the root user in an LXC Container (Enabled features: keyctl and Nesting)
Extra (like a sample repo to reproduce the issue, etc.)

Hey! :wave: @nicholaskoerfer
Thanks for your report! Indeed it is a bug we will need to investigate and to figure out how to fix it. :+1:
Explanations
To install apt packages, we need to be root.
To do so, we use a npm package: sudo-prompt.
This allows to prompt the user with a graphical OS dialog to enter the necessary password to be root.
The problematic keyword here is graphical, I'm not familiar with LXC containers but I don't think you are able to run UI.
Problematic line: https://github.com/leon-ai/leon-cli/blob/9da431c5c692d520d13c742bf3f154ce18808d8f/src/services/Requirements.ts#L84
Solution
We should be able to prompt the user to be root directly in the terminal without UI. That should fix the issue.
Workaround/Investigation
Currently to still be able to install Leon, you need to manually install Python and Pipenv.
We will need your help to investigate so hopefully we can fix the issue.
Could you run manually each line of this script and share with us, the output and errors you encounter: https://github.com/leon-ai/leon-cli/blob/develop/scripts/dependencies/install_apt_packages.sh
Thanks! :smile:
:tada: This issue has been resolved in version 1.4.0-beta.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 1.4.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: