Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library not loaded: '@rpath/libavcodec.framework/libavcodec #117

Closed
Toolenaar opened this issue Nov 8, 2022 · 7 comments
Closed

Library not loaded: '@rpath/libavcodec.framework/libavcodec #117

Toolenaar opened this issue Nov 8, 2022 · 7 comments

Comments

@Toolenaar
Copy link

Toolenaar commented Nov 8, 2022

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
@LeGoffMael
Copy link
Owner

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 ?

@Toolenaar
Copy link
Author

Toolenaar commented Nov 8, 2022

@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

@LeGoffMael
Copy link
Owner

LeGoffMael commented Nov 8, 2022

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

@tanersener
Copy link

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?

@lileitodev
Copy link

lileitodev commented Dec 8, 2022

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?

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.
image
image

@jtans
Copy link

jtans commented Dec 22, 2022

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 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?

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. image image

@LeGoffMael
Copy link
Owner

Closed because since 3.0.0, FFmpeg is not part of this package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants