Skip to content

libmpv.so.1 not found (when libmpv is already installed) - fixable but hackyΒ #2823

Open
@yashasolutions

Description

@yashasolutions

The problem

error while loading shared libraries: libmpv.so.1

$ python counter.py
/home/user/.flet/bin/flet-0.21.1/flet/flet: error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/home/user/code/flet/counter.py", line 29, in <module>
    flet.app(target=main)
  File "/home/user/code/flet/.venv/lib/python3.11/site-packages/flet_runtime/app.py", line 70, in app
    return asyncio.run(
           ^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/user/code/flet/.venv/lib/python3.11/site-packages/flet_runtime/app.py", line 207, in app_async
    await conn.close()
  File "/home/user/code/flet/.venv/lib/python3.11/site-packages/flet_runtime/flet_socket_server.py", line 191, in close
    if self.__receive_loop_task:
       ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FletSocketServer' object has no attribute '_FletSocketServer__receive_loop_task'. Did you mean: '_FletSocketServer__receive_loop'?

However, mpv is installed on the system (linux Arch):

$ ls -l /usr/lib/libmpv.so*
libmpv.so        libmpv.so.2      libmpv.so.2.2.0

The hacky fix

so a quick symlink can fix the problem:

 sudo ln -s /usr/lib/libmpv.so /usr/lib/libmpv.so.1

and then it works but I am sure the dependency resolution could figure this out on its own without this kind solution.

(side note: just found about Flet today, it looks amazing, can't wait to give a go with a real project)

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: linuxSpecific to one or more Linux distributions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions