我有一个 Flutter 项目,我试图在 iOS 上运行。它在我的基于 Intel 的 Mac 上正常运行,但在我新的基于 Apple Silicon 的 M1 Mac 上它无法安装 pod。
LoadError - dlsym(0x7f8926035eb0, Init_ffi_c): symbol not found - /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi.rb:6:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.12.0/lib/ethon.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/sources_manager.rb:74:in `cdn_url?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/sources_manager.rb:36:in `create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/sources_manager.rb:21:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:177:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:177:in `sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1073:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:414:in …Run Code Online (Sandbox Code Playgroud) 我使用的是 MacBook Pro M1(在有人说这是因为 M1 或其他原因之前,我已经使用 Flutter 和 M1 编程了好几个星期,但之后我必须重置我的 M1)...我的大问题:
\n每次运行 Pod Install 时出错,我都无法使用包含本机代码(例如shared_preferences或 )的包来启动我的项目。sqlite
我在 Stack Overflow 上进行了搜索,但到目前为止没有任何帮助。如果我在没有包的情况下启动我的项目,那么没有问题,这是我的 Flutter 代码,非常简单:
\nimport 'dart:convert';\nimport 'package:flutter/material.dart';\nimport 'package:http/http.dart';\nimport 'package:shared_preferences/shared_preferences.dart';\n\nvoid main() {\n runApp(MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n // This widget is the root of your application.\n @override\n Widget build(BuildContext context) {\n return MaterialApp(\n home: Home(),\n );\n }\n\n}\n\n\n`class Home extends StatelessWidget {\n const Home({Key key}) : super(key: key);\n\n @override\n Widget build(BuildContext context) {\n return Scaffold(\n body: …Run Code Online (Sandbox Code Playgroud) cocoapods visual-studio-code flutter flutter-packages apple-silicon
我开发电子商务应用程序已经大约 3 个月了,最近我切换到 MacO。\n当我在 iOS 模拟器中运行代码时遇到问题\每次运行它时都会收到此消息。
\n\nCocoaPods' output:\n\xe2\x86\xb3\n Preparing\n Analyzing dependencies\n Inspecting targets to integrate\n Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)\n Fetching external sources\n -> Fetching podspec for `Flutter` from `Flutter`\n -> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`\n -> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`\n -> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`\n -> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`\n Resolving dependencies of `Podfile`\nError output from CocoaPods:\n\xe2\x86\xb3\n Ignoring ffi-1.15.4 because its extensions are not built. Try: …Run Code Online (Sandbox Code Playgroud) 我正在尝试在xcode上运行离子应用程序.但是xcode抛出了一个apple match-o链接器错误.我得到这个错误,当我运行以下命令后得到这个:
cordova plugin add phonegap-plugin-push --variable SENDER_ID=5****** --save
我需要这个插件,用于推送通知.经过对谷歌的研究,我发现我需要在项目中安装Cocoapods.但安装Cocoapods和pod安装后.当我启动"project.xcworkspace"时,我收到以下错误.
diff: /Podfile.lock: No such file or directory diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
我试图重建/清理项目或再次安装pod.但它并没有为我确定.
有人能帮我吗?
编辑 - >新错误
Apple Mach-O链接器(ld)错误组
clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
当我用pod修复错误时,我收到此错误.
即使您安装了libyaml,libyaml警告也不会消失
gem install bundler
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Fetching: bundler-1.3.4.gem (100%)
Successfully installed bundler-1.3.4
Run Code Online (Sandbox Code Playgroud) 我在 macOS Big Sur 中查看了此Ruby 安装 (2.2.2) 失败
我的 macOS 是 Big Sur,我拥有的版本是 11.2,它是我能找到的最接近我的操作系统问题的版本,我尽我所能尝试
CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.5.3
Run Code Online (Sandbox Code Playgroud)
并且
RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC rbenv install 2.5.3
Run Code Online (Sandbox Code Playgroud)
这是我终端中的输出:
Downloading openssl-1.1.1i.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242
Installing openssl-1.1.1i...
Installed openssl-1.1.1i to /Users/richard/.rbenv/versions/2.5.3
Downloading ruby-2.5.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.bz2
Installing ruby-2.5.3...
WARNING: ruby-2.5.3 is nearing its end of life.
It only receives critical security updates, no bug fixes.
ruby-build: using readline from homebrew
/opt/homebrew/bin/ruby-build: line 1121: 31528 Killed: 9 "$RUBY_BIN" -e '
manager = ARGV[0]
packages = { …Run Code Online (Sandbox Code Playgroud) 当我尝试创建数据库时出现此错误
$ rake db:create
rake aborted!
LoadError: dlopen(/Users/agonzalez/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.6/lib/nokogiri/nokogiri.bundle, 0x0009): tried: '/Users/agonzalez/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.6/lib/nokogiri/nokogiri.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) - /Users/agonzalez/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.6/lib/nokogiri/nokogiri.bundle
/Users/agonzalez/Documents/join/config/application.rb:7:in `<top (required)>'
/Users/agonzalez/Documents/join/Rakefile:4:in `require_relative'
/Users/agonzalez/Documents/join/Rakefile:4:in `<top (required)>'
Caused by:
LoadError: cannot load such file -- /Users/agonzalez/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.6/lib/nokogiri/2.7/nokogiri
/Users/agonzalez/Documents/join/config/application.rb:7:in `<top (required)>'
/Users/agonzalez/Documents/join/Rakefile:4:in `require_relative'
/Users/agonzalez/Documents/join/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
Run Code Online (Sandbox Code Playgroud)
我已经尝试过
bundle config set force_ruby_platform true
Run Code Online (Sandbox Code Playgroud)
我的 ruby 版本是 ruby 2.7.1p83 (2020-03-31 修订版 a0c7c23c9c) [-darwin21]
捆绑版本 2.1.4
Rails 版本 5.2.7
Nokogiri 版本 nokogiri-1.13.6
我是 React Native 开发的新手。我正在使用带有 M1 芯片的新 MacBook Air(M1,2020)。我已经安装了以下依赖项:
Node = v14.15.3
Npm = 6.14.9
Homebrew = 2.7.0
react-native-cli: 2.0.1
Xcode Version 12.3
Run Code Online (Sandbox Code Playgroud)
项目创建日志如下:
alimran@Als-MacBook-Air prod % react-native init test
This will walk you through creating a new React Native project in /Users/alimran/workspace/reactnative/prod/test
Installing react-native...
Consider installing yarn to make this faster: https://yarnpkg.com
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated …Run Code Online (Sandbox Code Playgroud)