spotube
spotube copied to clipboard
AppImage on Gentoo - Cannot find libmpv at the usual places
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
After attempting to launch the AppImage file, it outputs the following message:
`package:media_kit_libs_linux registered.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Cannot find libmpv at the usual places. Depending upon your distribution, you can install the libmpv package to make shared library available globally. On Debian or Ubuntu based systems, you can install it with: apt install libmpv-dev.
#0 NativeLibrary.ensureInitialized (package:media_kit/src/player/native/core/native_library.dart:73)
#1 nativeEnsureInitialized (package:media_kit/src/player/native/player/real.dart:48)
#2 MediaKit.ensureInitialized (package:media_kit/src/media_kit.dart:25)
#3 main (package:spotube/main.dart:80)
#4 _runMain.
`
Expected Behavior
The app should open
Steps to reproduce
- Downloaded the AppImage from the link on github ( https://github.com/KRTirtho/spotube/releases/latest/download/Spotube-linux-x86_64.AppImage )
- Made the image executable with chmod +x
- On the console, on the same folder as the appimage file, as a normal user executed ./Spotube-linux-x86_64.AppImage
- Got the error posted before
- (just for testing) As a root got the same message
Operating System
Linux 6.1.28-gentoo #6 SMP PREEMPT_DYNAMIC Fri Aug 11 09:39:20 +08 2023 x86_64 12th Gen Intel(R) Core(TM) i5-12600K GenuineIntel GNU/Linux
Spotube version
3.1.0
Installation source
GitHub Releases (Binary)
Additional information
Packages installed related to this software:
- mpv
- mpv 0.35.1 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
- fuse
- 2.9.9-r2
- libmpv locations
- /usr/lib64/libmpv.so
- /usr/lib64/libmpv.so.2
- /usr/lib64/libmpv.so.2.0.0
Other appimage files work fine.
There seems to be a similar situation with Fedora reported, Can't install on Feodra 38 but since it is a different OS with some differences to Gentoo, I'm making a new report.
I tried the solution mentioned by RTTEXFile about a symbolic link but it didn't work. I tried copying the files to other common library folders, but that didn't work either.
@patomas
Upon inspection, the spotube AppImage appears to overwrite LD_LIBRARY_PATH with usr/lib
. I'm not sure about the specifics of your system, however regardless of whether usr/lib
exists or not, usr/lib/libmpv.so
definitely doesn't.
- Extract the AppImage:
./Spotube-linux-x86_64.AppImage --appimage-extract
(extracts contents intosquashfs-root
) - Edit
squashfs-root/AppRun
and changeexport LD_LIBRARY_PATH=usr/lib
toexport LD_LIBRARY_PATH=usr/lib64
- Launch spotube by executing
./squashfs-root/AppRun
Edit: This issue has been generalized and filed upstream at https://github.com/leanflutter/flutter_distributor/issues/139
Oops sorry, I wrote that part of code & made that mistake 😅. But usr/lib
is inside AppImage which isn't equivalent of /usr/lib
if I'm not wrong
So how does /usr/lib64 affect AppImage? Also libmpv is shipped with the AppImage including many other shared objects (.so) so it shouldn't even require one to install libmpv or mpv at all
I still have to try the extract option to test it but will do as soon as possible.
I tried a couple of locations copying libmpv.so but none worked.
Reading about the overwriting, I'll keep an eye on the referenced report to see how this evolves.
Weird thing is libmpv.so & libmpv.so.2 is already embedded in the appimage
Same error here: Spotube 3.1.1 Linux tux 5.15.52-gentoo-dist #1 SMP Sun Jul 3 05:21:48 -00 2022 x86_64 AMD Phenom(tm) II X4 965 Processor AuthenticAMD GNU/Linux
SOLVED: Following suggestion by @servusdei2018:
- Extract the AppImage: ./Spotube-linux-x86_64.AppImage --appimage-extract (extracts contents into squashfs-root)
- Edit squashfs-root/AppRun and change export LD_LIBRARY_PATH=usr/lib to export LD_LIBRARY_PATH=usr/lib64
- Emerging dev-libs/libappindicator
- Launch spotube by executing ./squashfs-root/AppRun
is now working for me
Btw there's a .tar.xz available which you use to manually install the app
I tried the unpacking option suggested before and the I had another problem, delated to libappindicator, which I solved installing that package ( emerge libappindicator
) since I'm in Gentoo.
Then I had the following error message
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPlatformDirectoryException(Unable to get application documents directory)
, I followed the answer from orange-kao and installed ( emerge xdg-user-dir
) and then the program started.
Then I got a message about encryption but that seems to be another issue.
So for now, I believe there is a path that you can follow to add the mentioned libraries to have a full appimage.
Thanks for the help and effort with this nice package
These are the AUR dependencies 'mpv' 'libappindicator-gtk3' 'libsecret' 'jsoncpp' 'libnotify'
Make sure to include Gentoo equivalent of these deps
Can anyone contribute with a ebuild
script for Spotube? It'll be better than AppImage
The aur PKGBUILD can followed https://github.com/KRTirtho/spotube/blob/master/aur-struct/PKGBUILD
I can try to do it, but I haven't done it before. It may be a good excercise for me. I'll try this week
Yea sure give it a try. It'll be a helpful for a lot of users & kind of a milestone for this app :muscle:
I mean how many flutter apps are there that are installable on Gentoo without manual work?! :smile:
I encountered this problem as well:
This indicates that one or more required dependencies could not be located.
Refer to "Installation" section of the README for further details:
GitHub : https://github.com/media-kit/media-kit#installation
pub.dev : https://pub.dev/packages/media_kit#installation
TIP: Copy-paste required packages from the above link to your pubspec.yaml.
If you recently added the packages, make sure to re-run the project ("hot-restart" & "hot-reload" is not sufficient for native plugins).
--------------------------------------------------------------------------------
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Cannot find libmpv at the usual places. Depending upon your distribution, you can install the libmpv package to make shared library available globally. On Debian or Ubuntu based systems, you can install it with: apt install libmpv-dev.
#0 NativeLibrary.ensureInitialized (package:media_kit/src/player/native/core/native_library.dart:78)
#1 nativeEnsureInitialized (package:media_kit/src/player/native/player/real.dart:47)
#2 MediaKit.ensureInitialized (package:media_kit/src/media_kit.dart:26)
#3 main (package:spotube/main.dart:43)
<asynchronous suspension>
I have yet to try the guide from @servusdei2018.
Updated: The guide didn t work for me