YunoHost-Apps / kresus_ynh

Kresus (personal finance manager) for YunoHost
https://kresus.org/
GNU Affero General Public License v3.0
20 stars 20 forks source link

Installing on ARM (stretch) doesn't work #16

Closed roukydesbois closed 6 years ago

roukydesbois commented 6 years ago

Hello there!

I just tried to install Kresus on my yunohost via the web admin interface and it didn't work. I have a LIME2 ARM board, with Stretch and the latest versions of the ynh tools. Here are the logs from yunohost-api.log:

2018-08-11 22:51:16,663 INFO moulinette.actionsmap process - processing action [658.28]: yunohost.app.install 2018-08-11 22:52:24,584 WARNING yunohost.hook - [658.28] debconf: unable to initialize frontend: Dialog 2018-08-11 22:52:24,600 WARNING yunohost.hook - [658.28] debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) 2018-08-11 22:52:24,604 WARNING yunohost.hook - [658.28] debconf: falling back to frontend: Readline 2018-08-11 22:52:24,666 WARNING yunohost.hook - [658.28] debconf: unable to initialize frontend: Readline 2018-08-11 22:52:24,670 WARNING yunohost.hook - [658.28] debconf: (This frontend requires a controlling tty.) 2018-08-11 22:52:24,675 WARNING yunohost.hook - [658.28] debconf: falling back to frontend: Teletype 2018-08-11 22:52:24,705 WARNING yunohost.hook - [658.28] dpkg-preconfigure: unable to re-open stdin: 2018-08-11 22:53:21,775 WARNING yunohost.hook - [658.28] 2018-08-11 22:53:21 URL:https://framagit.org/kresusapp/kresus/-/archive/0.13.2/kresus-0.13.2.tar.bz2 [2827724] -> "app.tar.bz2" [1] 2018-08-11 22:53:51,886 WARNING yunohost.hook - [658.28] Installation of N - Node.js version management 2018-08-11 22:53:53,235 WARNING yunohost.hook - [658.28] 2018-08-11 22:53:53 URL:https://codeload.github.com/tj/n/tar.gz/v2.1.7 [9592/9592] -> "n.tar.gz" [1] 2018-08-11 22:54:01,760 WARNING yunohost.hook - [658.28] ^M 0.2%^M 1.3%^M# 2.6%^M###### 8.9%^M########## 14.8%^M############## 20.8%^M################### 27.0%^M####################### 32.9%^M############################ 39.0%^M################################ 45.1%^M#################################### 51.4%^M###################################### 54.0%^M########################################### 60.5%^M################################################## 69.7%^M###################################################### 76.2%^M########################################################### 82.7%^M################################################################ 89.1%^M#################################################################### 95.7%^M######################################################################## 100.0% 2018-08-11 22:54:42,785 WARNING yunohost.hook - [658.28] ./install: line 105: virtualenv: command not found 2018-08-11 22:54:42,789 WARNING yunohost.hook - [658.28] !! 2018-08-11 22:54:42,815 WARNING yunohost.hook - [658.28] kresus's script has encountered an error. Its execution was cancelled. 2018-08-11 22:54:42,820 WARNING yunohost.hook - [658.28] !! 2018-08-11 22:54:42,833 WARNING yunohost.hook - [658.28] 2018-08-11 22:55:31,892 WARNING yunohost.hook - [658.28] /usr/local/n wasn't deleted because it doesn't exist. 2018-08-11 22:55:32,956 WARNING yunohost.hook - [658.28] Remove the user kresus 2018-08-11 22:55:36,738 SUCCESS yunohost.app success - [658.28] La configuration de SSOwat a été générée

I'm happy to be a guinea pig for further debug, please tell me where to look!

LowMem commented 6 years ago

Hello, thanks for having taken time to open this issue.

Can you please launch following command as root on your lime2 and write back what it respond ?

arch

Can you also install following packages before installation:

libxslt-dev libjpeg-dev libxml2-dev

If after these packages and kresus installations all is up and running, then we can follow this recommended fix. ;-)

If not, then we can go on digging the root cause. :-/

roukydesbois commented 6 years ago

Hello @LowMem

Thanks for your answer.

Running arch displays: armv7l

For your information, when I apt-get install the list of package you provided me, I get this message before I accept to install: Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'

installation of the packages went ok. I installed Kresus from the web admin, and here is the messages I get from the web admin (sorry for the antichronological order, not my fault ^^):

/usr/local/n wasn't deleted because it doesn't exist.
!!
kresus's script has encountered an error. Its execution was cancelled.
!!
./install: line 105: virtualenv: command not found
0.2% 0.6% 1.3% ###### 8.5% ########## 14.6% ############### 20.9% ################### 27.4% ######################## 33.6% ############################ 39.8% ################################# 46.2% ################################### 49.9% ######################################## 56.0% ########################################## 59.1% ############################################### 65.3% ################################################ 68.0% ##################################################### 74.2% ########################################################## 80.6% ############################################################## 87.2% ################################################################### 93.4% ####################################################################### 99.8% ######################################################################## 100.0%
2018-08-25 22:29:33 URL:https://codeload.github.com/tj/n/tar.gz/v2.1.7 [9592] -> "n.tar.gz" [1]
Installation of N - Node.js version management
2018-08-25 22:29:02 URL:https://framagit.org/kresusapp/kresus/-/archive/0.13.2/kresus-0.13.2.tar.bz2 [2827724] -> "app.tar.bz2" [1]
dpkg-preconfigure: unable to re-open stdin:
debconf: falling back to frontend: Teletype
debconf: (This frontend requires a controlling tty.)
debconf: unable to initialize frontend: Readline
debconf: falling back to frontend: Readline
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: unable to initialize frontend: Dialog

So, I don't have virtualenv. Is it supposed to be installed during the installation, or is it a prerequisite?

Thanks for your help!

roukydesbois commented 6 years ago

Short news: installing virtualenv prior to the installation makes me go a few steps forward, but I'm still facing errors:

Warning: Installation of N - Node.js version management                                     Warning: 2018-08-30 00:28:01 URL:https://codeload.github.com/tj/n/tar.gz/v2.1.7 [9592/9592] -> "n.tar.gz" [1]                             ######################################################################## 100.0%             Warning:   Failed building wheel for lxml     Warning:   Failed building wheel for Pillow   Warning: Command "/var/www/kresus/venv/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-0Poubv/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-fxzvPS/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/kresus/venv/include/site/python2.7/lxml" failed with error code 1 in /tmp/pip-install-0Poubv/lxml/
Warning: !!
Warning:   kresus's script has encountered an error. Its execution was cancelled.
Warning: !!
Warning:
Warning: /usr/local/n wasn't deleted because it doesn't exist.
Warning: Remove the user kresus
Success! The SSOwat configuration has been generated
Error: Installation failed

It might just be that my board is not powerful (it was quite loaded during the install), but where can I look for more details about the python errors at the beginning?

Jibec commented 6 years ago

The Python install we have require a lot of package generation. It require significant RAM and will use swap space if it isn't sufficient. I'm personally not confident with the myth we can have a multipurpose server on such a small board. For issues like this one. Anyway, I'll try to have more package installed trough Debian packages. But I'm pretty sure we'll have compatibility issues with source code soon.

roukydesbois commented 6 years ago

I quite agree with you, because even if i manage to install it I'm not sure it will run nicely afterwards. So probably the best fix for this issue is to add some warning/requirements to have a powerful enough machine if Kresus is to be installed along with other apps, or that it should be alone, or at least not installed on the same board as resources heavy other apps, don't you think?

Jibec commented 6 years ago

Nope, running the software won't require much power. It really is an installation issue since pip will compile it locally. Lxml for example is quite a big piece of software. I'll try to fix it, but it will take some time, but I won't forget you ;)

ZeHiro commented 6 years ago

Normally we can install python-lxml from debian repos. I need to check if works first, but it should be ok according to Weboob team

Jibec commented 6 years ago

Indeed, but I'm not afraid by lxml. To enable the usage of Debian package by pip, we have to enable the whole virtualenv to use Debian package. And we can't be 100% sure which packages are installed, because each server uses different lists. The issue comes with the app dependencies, some Debian packages might be too old and result in an installation failure. But I'll try, you'll tell us if it works.

ZeHiro commented 6 years ago

Well, we have a problem, python-lxml is already installed by debian, but pip installs it in the virualenv....

Jibec commented 6 years ago

Here is the doc: https://virtualenv.pypa.io/en/stable/userguide/#the-system-site-packages-option and here is an alternative way with symbolic links: https://stackoverflow.com/questions/14571454/virtualenv-specifing-which-packages-to-use-system-wide-vs-local#14571660

Jibec commented 6 years ago

can you please try the testing branch?

sudo yunohost app install https://github.com/YunoHost-Apps/kresus_ynh/tree/testing --debug
or
sudo yunohost app upgrade kresus -u https://github.com/YunoHost-Apps/kresus_ynh/tree/testing --debug
roukydesbois commented 6 years ago

Man, you rock! It installed smoothly. Do you want me to send some logs for you to make sure everything went as you expected?

Jibec commented 6 years ago

I'm glad you liked it, I got some help too. No logs needed, just keep having patience and to report issues. It helps a lot.