我是 macOS 和 Docker 的新手。当我尝试在 Apple Silicon M2 上使用 Docker 启动我的项目时,遇到了一系列障碍。我认为我面临的问题与图像之间的不良兼容性有关:webdevops/php-apache-dev:7.2 和我正在使用的平台。
\n我的 docker-compose.yml 如下所示:
\nversion: "3"\nservices:\n web:\n image: webdevops/php-apache-dev:7.2\nRun Code Online (Sandbox Code Playgroud)\n另外,我在某些方面对其进行了更改以添加:
\nversion: "3"\nservices:\n web:\n platform:linux/amd64\n image: webdevops/php-apache-dev:7.2\nRun Code Online (Sandbox Code Playgroud)\n但不断出现错误。
\n我不知道还能尝试什么。如果您有任何见解或解决方案可以分享,我将非常感谢您的指导!
\n当我启动 docker-compose up 时,我在 my_project 容器内收到一条错误消息,如下所示:
\ngoroutine 1 [running]:\nruntime.systemstack_switch()\n /usr/local/Cellar/go/1.8.1/libexec/src/runtime/asm_amd64.s:281 fp=0xc420028788 sp=0xc420028780\nruntime.main()\n /usr/local/Cellar/go/1.8.1/libexec/src/runtime/proc.go:127 +0x6c fp=0xc4200287e0 sp=0xc420028788\nruntime.goexit()\n /usr/local/Cellar/go/1.8.1/libexec/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc4200287e8 sp=0xc4200287e0\nmy_project exited with code 2\n\nRun Code Online (Sandbox Code Playgroud)\n为了排除故障,我尝试将 platform: linux/amd64 密钥添加到 docker-compose.yml 文件中的 Web 服务。然而,这导致了另一个障碍:
\nError response from daemon: image with reference webdevops/php-apache-dev:7.2 was …Run Code Online (Sandbox Code Playgroud) 我想在带有 M2 pro 苹果芯片的 MacO 上安装 v8 3.15。收到禁用的错误。
我尝试使用 Rosetta 安装 x86-64 brew 并使用它来安装 v8,但仍然遇到相同的错误。有没有人有解决这个问题的方法,或者 homebrew 已经完全废弃了英特尔和苹果芯片的 v8@3.15 ?
我正在尝试使用以下命令在我的 Apple M2 MacBookPro 中安装 cocoapods:
sudo gem install cocoapods
Run Code Online (Sandbox Code Playgroud)
然后我收到以下错误:
Fetching rexml-3.2.5.gem
Fetching nanaimo-0.3.0.gem
Fetching colored2-3.1.2.gem
Fetching claide-1.1.0.gem
Fetching atomos-0.1.3.gem
Fetching ruby-macho-2.5.1.gem
Fetching xcodeproj-1.22.0.gem
Fetching nap-1.1.0.gem
Fetching molinillo-0.8.0.gem
Fetching gh_inspector-1.1.3.gem
Fetching fourflusher-2.3.1.gem
Fetching escape-0.0.4.gem
Fetching cocoapods-try-1.2.0.gem
Fetching netrc-0.11.0.gem
Fetching cocoapods-trunk-1.6.0.gem
Fetching cocoapods-search-1.0.1.gem
Fetching cocoapods-plugins-1.0.0.gem
Fetching cocoapods-downloader-1.6.3.gem
Fetching cocoapods-deintegrate-1.0.5.gem
Fetching ffi-1.15.5.gem
Fetching ethon-0.16.0.gem
Fetching typhoeus-1.4.0.gem
Fetching public_suffix-4.0.7.gem
Fetching fuzzy_match-2.0.4.gem
Fetching concurrent-ruby-1.1.10.gem
Fetching json-2.6.3.gem
Fetching httpclient-2.8.3.gem
Fetching algoliasearch-1.27.5.gem
Fetching addressable-2.8.1.gem
Fetching zeitwerk-2.6.6.gem
Fetching tzinfo-2.0.5.gem
Fetching minitest-5.17.0.gem
Fetching cocoapods-1.11.3.gem
Fetching i18n-1.12.0.gem
Fetching …Run Code Online (Sandbox Code Playgroud)