flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.45k stars 446 forks source link

Unable to load app, since can't open share object file [libmpv] shared object file not found error. (Arch linux) #2768

Closed Lucifer516-sudoer closed 8 months ago

Lucifer516-sudoer commented 8 months ago

Description

I was offline for few weeks and then saw that flet got an new release, so I wanted to check it out, so just as I tried to run the program, I got the error as follows:

/home/lucifer/.flet/bin/flet-0.20.2/flet/flet: error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory

Code example to reproduce the issue:

import flet as ft

def main(page: ft.Page):

    page.add(ft.Text("Hello"))
    page.update()

ft.app(target=main)

Well, after receieving this error, I went on googled, and didnt get anything there, so I came here to search the issues and people did get the same issue as I am facing, and their issue was also fixed I guess, but when i followed that people have discussed there, I couldn't resolve the error. I checked, if libmpv, libmujs, and libjpeg-turbo are installed, and hoped that, i must have solved the issue, but surprisingly, The issue is still there for me.

Here is the result when i tried to install 'em on the machine: image

Well I also turned on the logging for this code from the script which resulted in:

INFO:flet_runtime:Assets path configured: /home/lucifer/projects/py_projects/osd/osd/assets
DEBUG:flet_runtime:Creating new PubSubHub instance
INFO:flet_runtime:Starting up UDS server on /tmp/GfceDSBIEN
DEBUG:flet_runtime:Waiting for a client connection
INFO:flet_runtime:App URL: /tmp/GfceDSBIEN
INFO:flet_runtime:Connected to Flet app and handling user sessions...
INFO:flet_runtime:Starting Flet View app...
INFO:flet_runtime:Flet View found in: /home/lucifer/.flet/bin/flet-0.20.2
/home/lucifer/.flet/bin/flet-0.20.2/flet/flet: error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory
DEBUG:flet_runtime:Closing connection...

Don't bother about this if this ain't necessary, I just wanted to make sure, that I provided enough information and i checked in my usr/lib, and the shared object file does exists,

image but one, thing that i did recognise was, i was having the so file so.2 but flet raised the error as libmpv.so.1 not found BTW, i am new to arch recently hopped on to arch to try, so sorry if something was newbie.

I hope, the information I provided are helpful to you guys.

Thanks A lot In advance.


The result I expected: Expected output is to get an flet app screen with text control

Flet version (pip show flet):

Name: flet
Version: 0.20.2
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page: 
Author: Appveyor Systems Inc.
Author-email: hello@flet.dev
License: Apache-2.0
Location: /home/lucifer/.cache/pypoetry/virtualenvs/osd-7q4EHxq4-py3.11/lib/python3.11/site-packages
Requires: cookiecutter, flet-runtime, packaging, qrcode, watchdog, websocket-client, websockets
Required-by: 

My only direct requirement in that environment was flet alone.


Operating system:

Additional environment details:

OS: Garuda Linux x86_64 
Host: HP Laptop 15s-fq5xxx 
Kernel: 6.7.6-zen1-1-zen 
Shell: bash 5.2.26 
DE: GNOME 45.4 
WM: Mutter 

INFO Related to Python Env:

Virtualenv
Python:         3.11.7
Implementation: CPython
Path:           /home/lucifer/.cache/pypoetry/virtualenvs/osd-7q4EHxq4-py3.11
Executable:     /home/lucifer/.cache/pypoetry/virtualenvs/osd-7q4EHxq4-py3.11/bin/python
Valid:          True

System
Platform:   linux
OS:         posix
Python:     3.11.7
Path:       /usr
Executable: /usr/bin/python3.11
justinkumpe commented 8 months ago

I had the same issue. The below linked comment was the only thing that fixed it for me. https://github.com/flet-dev/flet/issues/2637#issuecomment-1947321450

Lucifer516-sudoer commented 8 months ago

I had the same issue. The below linked comment was the only thing that fixed it for me. #2637 (comment)

Okay bro, sure thing, Will try this

ndonkoHenri commented 8 months ago

Closing in favour of https://github.com/flet-dev/flet/issues/2637

Lucifer516-sudoer commented 8 months ago

I had the same issue. The below linked comment was the only thing that fixed it for me. #2637 (comment)

Sorry to interrupt again, I followed as its suggested, I just ran into more errors, each resulting in an missing shared library fi;le, i think flet expects an lib or different version and I have another version, since all those dependencies are satisfied in my system

Lucifer516-sudoer commented 8 months ago

And i dont know for sure, is this issue only on my system or can someone check on their side and share me some idea.

lleonardonascimento commented 8 months ago

@Lucifer516-sudoer i had the same issue. I'm on Manjaro and first i've got error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory, so i followed https://github.com/flet-dev/flet/issues/2637#issuecomment-1947321450. Now i've got error while loading shared libraries: libmujs.so.2: cannot open shared object file: No such file or directory.

libmpv, libmujs, and libjpeg-turbo are installed

240306_20h05m03s_screenshot

I don't have libmujs.so.2 on my system and didn't find on internet what package do i have to install on Arch based distros to get it. If someone could find out i will thank you.

TazMania-Git commented 8 months ago

Hi, in the same situation as @lleonardonascimento and @Lucifer516-sudoer

DaviVolcan commented 7 months ago

I'm on manjaro, and i got "error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory" the workaround that worked: #2823

lleonardonascimento commented 7 months ago

@DaviVolcan do you have libmujs.so.2 on your system? If yes, what package did you install to get it? I followed https://github.com/flet-dev/flet/issues/2823 but i get error while loading shared libraries: libmujs.so.2: cannot open shared object file: No such file or directory. I'm on manjaro kde.

DaviVolcan commented 7 months ago

@lleonardonascimento No, i don't... i'm also in manjaro kde. image

Lucifer516-sudoer commented 5 months ago

Well, upto this date, i have my arch system and still getting the same issue, i have a small doubt, well since we cannot install the version flet needs, since arch, manjaro, etc,.. are rolling release systems, they can include those libs in the package is that possible? i am just curious, and correct me if I am wrong