FaithLife-Community / LogosLinuxInstaller

A Python application that helps install and maintain FaithLife's Logos Bible (Verbum) Software on Linux through Wine.
MIT License
33 stars 10 forks source link

There are two different errors to install in Ubuntu 24.04 LXD #101

Open eu4you opened 6 months ago

eu4you commented 6 months ago

Hello. May the Lord grant you His grace and peace.

I'm trying to install logos on lxd.

lxc launch ubuntu:24.04 lxd_name --profile default --profile x11
lxc exec lxd_name /bin/bash

I then installed lightdm, xfce4, and tightvncserver.

apt update && apt upgrade -y && apt install lighdm xfce4 tightvncserver

And I tried to install logos.

apt install patch lsof wget sed grep gawk winbind cabextract x11-apps bc

apt install build-essential tcl-dev tk-dev libreadline-dev
apt install python3-pip libssl-dev python3-tk

adduser logos
su logos
cd ~

wget 'https://www.python.org/ftp/python/3.12.1/Python-3.12.1.tar.xz'
tar xf Python-3.12.1.tar.xz
cd Python-3.12.1
Python-3.12.1$ ./configure --prefix=/opt --enable-shared
Python-3.12.1$ make -j 4
Python-3.12.1$ sudo make install -j 4
Python-3.12.1$ LD_LIBRARY_PATH=/opt/lib /opt/bin/python3.12 --version
Python 3.12.1

wget https://github.com/FaithLife-Community/LogosLinuxInstaller/releases/download/v4.0.0-alpha.6/LogosLinuxInstaller
wget https://github.com/FaithLife-Community/LogosLinuxInstaller/archive/refs/tags/v4.0.0-alpha.6.tar.gz
tar -xvf v4.0.0-alpha.6.tar.gz

cd LogosLinuxInstaller-4.0.0-alpha.6
LogosLinuxInstaller-4.0.0-alpha.6$ LD_LIBRARY_PATH=/opt/lib /opt/bin/python3.12 -m venv env
LogosLinuxInstaller-4.0.0-alpha.6$ echo "LD_LIBRARY_PATH=/opt/lib" >> env/bin/activate
LogosLinuxInstaller-4.0.0-alpha.6$ echo "export LD_LIBRARY_PATH" >> env/bin/activate
LogosLinuxInstaller-4.0.0-alpha.6$ source env/bin/activate
LogosLinuxInstaller-4.0.0-alpha.6$ pip install -r requirements.txt
LogosLinuxInstaller-4.0.0-alpha.6$ ./LogosLinuxInstaller.py

Choose product…
Choose product…
[----------------------------------------]
Choose version…
Choose version…
[**--------------------------------------]
Choose product release…
Choose product release…
[****------------------------------------]
Downloading release list for Logos 10…
Choose installation folder…
[******----------------------------------]
Choose installation folder…
[******----------------------------------]
Where should Logos files be instaled to? [/home/logos/LogosBible10]:
Using default location.
Choose wine binary…
[*******---------------------------------]
Error: unable to open display :0
/tmp/.mount_wine-dadnlBN/wrapper: line 93: /tmp/.mount_wine-dadnlBN/usr/bin/wine: No such file or directory
Choose winetricks binary…
[*********-------------------------------]
Choose winetricks binary…
[*********-------------------------------]
Winetricks will be downloaded from the Internet.
Ensuring install fonts choice…
[***********-----------------------------]
Ensuring check system dependencies choice…
[*************---------------------------]
Ensuring installation config is set…
[**************--------------------------]
Ensuring installation directories…
[****************------------------------]
Ensuring system dependencies are met…
[******************----------------------]
Ensuring wine AppImage is downloaded…
[********************--------------------]
Copying wine-devel_8.19-x86_64.AppImage into /home/logos/Downloads
Ensuring wine executables are available…
[**********************------------------]
Ensuring winetricks executable is available…
[************************----------------]
Ensuring Logos installer is downloaded…
[***************************-------------]
Copying Logos_v29.1.0.0022-x64.msi into /home/logos/Downloads
Ensuring wineprefix is initialized…
[*****************************-----------]
Initializing wine bottle...
Traceback (most recent call last):
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/./LogosLinuxInstaller.py", line 358, in <module>
    main()
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/./LogosLinuxInstaller.py", line 347, in main
    config.ACTION()
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/./LogosLinuxInstaller.py", line 259, in run_control_panel
    tui_app.control_panel_app()
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/tui_app.py", line 100, in control_panel_app
    installer.ensure_launcher_shortcuts()
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/installer.py", line 637, in ensure_launcher_shortcuts
    ensure_launcher_executable(app=app)
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/installer.py", line 615, in ensure_launcher_executable
    ensure_config_file(app=app)
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/installer.py", line 577, in ensure_config_file
    ensure_product_installed(app=app)
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/installer.py", line 559, in ensure_product_installed
    ensure_winetricks_applied(app=app)
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/installer.py", line 506, in ensure_winetricks_applied
    ensure_wineprefix_init(app=app)
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/installer.py", line 500, in ensure_wineprefix_init
    wine.initializeWineBottle()
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/wine.py", line 168, in initializeWineBottle
    run_wine_proc(config.WINE_EXE, exe='wineboot', exe_args=['--init'])
  File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/wine.py", line 205, in run_wine_proc
    codepages = get_registry_value('HKCU\\Software\\Wine\\Fonts', 'Codepages').split(',')  # noqa: E501
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'
...
  1. /tmp/.mount_wine-dadnlBN/wrapper: line 93: /tmp/.mount_wine-dadnlBN/usr/bin/wine: No such file or directory

In the GUI, it gets stuck here and won't let me proceed. It repeats this error several times a second. In the CLI, as you can see, it only throws one error and then passes.

2.

File "/home/logos/LogosLinuxInstaller-4.0.0-alpha.6/wine.py", line 205, in run_wine_proc
    codepages = get_registry_value('HKCU\\Software\\Wine\\Fonts', 'Codepages').split(',')  # noqa: E501
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'
  1. if I comment out all lines 203-206 of wine.py and run it again with the CLI, I get the error below.
Initializing wine bottle...
Waiting on "/home/logos/LogosBible10/data/bin/wineserver -w" to finish.
Ensuring winetricks & other settings are applied…
[*******************************---------]
Installing registry file: /tmp/LBS.saay_hb7/disable-winemenubuilder.reg
2024-05-04 15:30:01 CRITICAL: Failed to install reg file: /tmp/LBS.saay_hb7/disable-winemenubuilder.reg
If you need help, please consult:
https://github.com/FaithLife-Community/LogosLinuxInstaller/wiki
https://t.me/linux_logos
https://matrix.to/#/#logosbible:matrix.org
Killed

I`m not a computer major, nor am I a programmer, so I'm having a very hard time figuring this out. What should I do?

thw26 commented 5 months ago

Thank you for reporting this, and sorry for the delay. May the Lord be gracious to you and make his face to shine upon you!

I have yet to see this issue.

@n8marti, have you seen this? I don't think I've touched that part of the code for a while. You last touched it on 2024/4/10, but that was just to add noqa.

n8marti commented 5 months ago

So it's trying to find a wine registry value so that wine cmd's output uses the right text encoding. That registry value doesn't appear to exist, so it returns None instead, which can't be parsed for the correct codepage value. But I think the actual problem might have more to do with the fact that this is in an lxd container.

Choose wine binary… [***---------------------------------] Error: unable to open display :0 /tmp/.mount_wine-dadnlBN/wrapper: line 93: /tmp/.mount_wine-dadnlBN/usr/bin/wine: No such file or directory

This seems to show that wine isn't actually found, which makes me think that the appimage isn't running correctly in the lxd container. @eu4you, are you sure you have the basic lxd container setup correctly for using GUI apps? It seems like there might more steps needed than what you've shown above (see e.g. https://dev.to/amabe_dev/how-to-run-gui-apps-in-lxd-containers-882). There might be other "missing" parts, too, since lxd containers are minimal systems. We might not explicity check for all the needed dependencies, because certain ones might be installed on all linux-based desktop systems but still be missing from an lxd container.

kennylarsen commented 4 months ago

This may, or may not be related, but I just tried an install on a fresh Ubuntu 24.04 system. I got a similar error. Manually installing winetricks as per the ubuntu/ debain install instructions seems to have fixed the issue.