Error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory

1.6k views Asked by At

I've installed flet through "pip install flet" from the terminal on Ubuntu. Upon running the basic flet code, just to check whether it worked this pops up:

error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory

The code I ran is:

import flet as ft

def main(page: ft.Page):
    # add/update controls on Page
    pass

ft.app(target=main)

I also followed the Linux system instructions from terminal to install flet:

sudo apt-get update
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio`

What can I try next? I'm relatively new to Ubuntu.

I expected a basic flet window to pop up, and not an error from the terminal. Something like:

basic flet window the code was supposed to create

Instead I got the error:

error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory

1

There are 1 answers

0
WizeRacoon On

Actually ran into this issue today and came across your post whilst troubleshooting it.

What worked for me was installing libmpv by running:

sudo apt install libmpv1

After, you should be able to follow the flet introduction as intended.