我有一个 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) 我在 M1 MacBook 上。这是我尝试安装 Homebrew 时的错误:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Homebrew is not (yet) supported on ARM processors!
Rerun the Homebrew installer under Rosetta 2.
If you really know what you are doing and are prepared for a very broken experience you can use another installation option for installing on ARM:
https://docs.brew.sh/Installation
Run Code Online (Sandbox Code Playgroud)
那么我如何“在 Rosetta 2 下重新运行 Homebrew 安装程序”?
我正在运行Docker Apple Silicon Preview的最新版本。我创建了教程容器/图像,它工作正常。当我创建自定义 YAML 文件并运行 docker-compose 时,在拉取 mysql 时出现以下错误:
错误:清单列表条目中没有与 linux/arm64/v8 匹配的清单
这是我的 YAMl 文件中的一个片段:
version: '3'
services:
# Database
db:
image: mysql-server:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: pass
MYSQL_DATABASE: wp
MYSQL_USER: wp
MYSQL_PASSWORD: wp
networks:
- wpsite
Run Code Online (Sandbox Code Playgroud)
我试过 :latest 和 :8 导致同样的错误。它可以很好地拉动 phpmyadmin 和 wordpress。
我使用最新的Apple M1芯片处理器。而且我在应用程序安装时不断收到错误消息。
说。,
brew install openjdk@11
Run Code Online (Sandbox Code Playgroud)
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
Please create a new installation in /opt/homebrew using one of the
"Alternative Installs" from:
https://docs.brew.sh/Installation
You can migrate your previously installed formula list with:
brew bundle dump
Run Code Online (Sandbox Code Playgroud)
需要帮助以了解要遵循的确切步骤。
我使用brew安装gdb失败。我正在使用以下命令:
brew install gdb
Run Code Online (Sandbox Code Playgroud)
gdb 在 mac m1(苹果硅)上可用吗?如果是这样,我该怎么办?
我面临奇怪的问题。在我更新我的 Android Studio 之前,flutter doctor 一切正常。一旦我更新了 Android Studio,当我运行医生时,它会显示“无法找到捆绑的 Java 版本”。我已经下载了 Java 安装程序并安装在我的 M1 Mac 上,但是重新启动后,运行 flutter doctor 仍然显示相同的错误。奇怪的是,当我卸载北极狐版本并重新安装旧的 Android Studio 版本时,运行医生时一切正常。如果你们中有人遇到过这个问题,请帮忙指点一下。谢谢
您如何获得在 Apple Silicon 架构上运行的 Ruby、Python 和 Node.js 开发环境。Docker 等虚拟化软件呢?
我正在使用一个无法为 Apple M1 编译的库,因此我决定编译它并使用 x86_64 的 (Rosetta 2) 使用它,我成功地按照此为x86_64 安装了brew 和 clang。
但是,当我编译我的项目并尝试将其链接到该库时,我收到此错误:
ld: warning: ignoring file ..../libapronxx.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
...
ld: symbol(s) not found for architecture arm64
Run Code Online (Sandbox Code Playgroud)
我尝试设置编译器和链接器标志(“-arch x86_64”),但仍然遇到同样的问题。
我的问题是:在 Apple M1(arm)上使用 cmake 构建 macOS-x86_64 的正确方法是什么?
附加信息:我通过 CLion 使用 cmake。
更新:我使用以下命令成功编译了我的项目:
# install a x86 cmake
arch -x86_64 /usr/local/bin/brew install cmake
...
# in the build directory
arch -x86_64 /usr/local/bin/cmake ..
make
arch -x86_64 ./my_exe
Run Code Online (Sandbox Code Playgroud)
我还使用 -arch …
自从我买了一台新的基于 ARM 的 M1 MacBook Pro,我就一直遇到严重且一致的 PostgreSQL 问题 (psql 13.1)。无论我使用 Rails 服务器还是 Foreman,我都会在浏览器和终端中收到错误,例如PG::InternalError: ERROR: could not read block 15 in file "base/147456/148555": Bad addressorPG::Error (invalid encoding name: unicode)或Error during failsafe response: PG::UnableToSend: no connection to the server。奇怪的是,我经常可以反复刷新浏览器以使其正常工作(直到它们不可避免地再次出现)。
我知道与基于 ARM 的 M1 Mac 相关的所有配置挑战,这就是为什么我以多种方式多次卸载并重新安装从 Homebrew 到 Postgres 的所有内容(使用 Rosetta,不使用 Rosetta,使用arch -x86_64 brew命令,使用 Postgres 应用程序)而不是 Homebrew 安装)。我在随机留言板上遇到了其他几个人,他们遇到了同样的问题(也在新的 Mac 上)并且没有任何运气,这就是为什么我不愿意相信这是一个驱动器损坏问题。(我也多次运行磁盘工具急救检查;它说一切正常,但我不知道它有多可靠。)
我正在使用thoughtbot parity 将我的开发环境数据库与当前生产中的数据库同步。当我运行时development restore production,我在终端中得到数百行,看起来像下面的输出(这是在下载完成后立即但在继续创建默认值、处理数据、序列集等之前)。我相信这是问题的根源,但我不确定解决方案是什么:
pg_restore: dropping TABLE [table name1]
pg_restore: from TOC …Run Code Online (Sandbox Code Playgroud) pg-restore thoughtbot macos-big-sur postgresql-13 apple-silicon
我知道可以使用活动监视器来检查进程是否正在通过 Apple Silicon 上的 Rosetta 运行。我想知道是否有办法对终端执行相同的操作?
编辑:
该进程是其他应用程序,因此如果有办法检查该进程是否在 Rosetta 中运行,则可能的命令可能具有以下语法:
$ is_running_under_rosetta <pid>
这会输出
yes或者no。