Library not loaded: '@rpath/libavcodec.framework/libavcodec
Toolenaar opened this issue · comments
I am having a problem when running this plugin on iOS. Everytime I run the app it crashes on startup with the following error.
This might have something todo with arthenica/ffmpeg-kit#590
But I am not able to solve this using the steps they describe.
Library not loaded: '@rpath/libavcodec.framework/libavcodec'
Referenced from: '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Runner'
Reason: tried: '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/System/Library/Frameworks/libavcodec.framework/libavcodec' (no such file)
Library not loaded: '@rpath/libavcodec.framework/libavcodec'
Referenced from: '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Runner'
Reason: tried: '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/private/var/containers/Bundle/Application/C7643BCB-DC14-44D8-9183-331C54D815AC/Runner.app/Frameworks/libavcodec.framework/libavcodec' (no such file), '/private/var/container
I also faced some issue when i switched to the latest ffmpeg release.
I described how i fixed this issue in the comment of the issue you linked : arthenica/ffmpeg-kit#590 (comment)
Don't you have an issue when running pod install
?
@LeGoffMael I tried your solution but it did not work for me, however I found that if I roll back to version 1.4.3 and use ffmpeg version 4.5.1 it worked. Not a fix but a workaround for now.
video_editor: ^1.4.3
dependency_overrides:
ffmpeg_kit_flutter_min_gpl: ^4.5.1-LTS
Yes it seems this error occur only using the latest ffmpeg release (5.1.0) that video_editor is using since 1.5.0
.
It seems that it is an cocoapods issue. I don't know what you can do, but check if you have the latest cocoapods and xcode version.
maybe overriding ffmpeg and using the latest video_editor version as a workaround is enough ?
dependency_overrides:
ffmpeg_kit_flutter_min_gpl: ^4.5.1
I never managed to reproduce this issue. So, I'm not 100% sure about the reason and the fix.
However, a similar error is reported in CocoaPods/CocoaPods#11608, CocoaPods/CocoaPods#10390 and flutter/flutter#92896.
Those issues say that having an old ruby-macho
package is the reason and upgrading ruby-macho
fixes the issue.
Could anyone having this issue check the current version with gem list ruby-macho
and see if updating it via sudo gem update ruby-macho
fixes it?
I never managed to reproduce this issue. So, I'm not 100% sure about the reason and the fix.
However, a similar error is reported in CocoaPods/CocoaPods#11608, CocoaPods/CocoaPods#10390 and flutter/flutter#92896.
Those issues say that having an old
ruby-macho
package is the reason and upgradingruby-macho
fixes the issue.Could anyone having this issue check the current version with
gem list ruby-macho
and see if updating it viasudo gem update ruby-macho
fixes it?
update ruby-macho make me install two version ruby-macho.The problem not fix. but I uninstall all versions cocoapods and uninstall all versions ruby-macho and then install the lastest cocoapods. and then there is only one version ruby-macho. the problem fixed.Thank you.
Thanks, solved a problem that has been bugging me for days
I never managed to reproduce this issue. So, I'm not 100% sure about the reason and the fix.
However, a similar error is reported in CocoaPods/CocoaPods#11608, CocoaPods/CocoaPods#10390 and flutter/flutter#92896.
Those issues say that having an oldruby-macho
package is the reason and upgradingruby-macho
fixes the issue.
Could anyone having this issue check the current version withgem list ruby-macho
and see if updating it viasudo gem update ruby-macho
fixes it?update ruby-macho make me install two version ruby-macho.The problem not fix. but I uninstall all versions cocoapods and uninstall all versions ruby-macho and then install the lastest cocoapods. and then there is only one version ruby-macho. the problem fixed.Thank you.
![]()
Closed because since 3.0.0, FFmpeg is not part of this package