@F_G

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

Mac m1 で stable diffusion web ui をダウンロードしたいが、コマンドでエラーが起きてしまう

Mac m1 で stable diffusion web ui をダウンロードしたいが、コマンドでエラーが起きてしまう。

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Installation-on-Apple-Silicon
こちらの説明を読み、homebrewをインストールして 2.の

brew install cmake protobuf rust python@3.10 git wget

を実行しようとすると

Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
Warning: cmake 3.25.2 is already installed and up-to-date.
To reinstall 3.25.2, run:
  brew reinstall cmake
Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!
To rerun under ARM use:
    arch -arm64 brew install ...
To install under x86_64, install Homebrew into /usr/local.

試してみたこと

・arch -arm64 brew install を実行した→長いエラーが出てしまいました

Usage: brew install [options] formula|cask [...]

Install a formula or cask. Additional options specific to a formula may be
appended to the command.

Unless HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set, brew upgrade or brew
reinstall will be run for outdated dependents and dependents with broken
linkage, respectively.

Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for
the installed formulae or, every 30 days, for all formulae.

Unless HOMEBREW_NO_INSTALL_UPGRADE is set, brew install formula will
upgrade formula if it is already installed but outdated.

  -d, --debug                      If brewing fails, open an interactive
                                   debugging session with access to IRB or a
                                   shell inside the temporary build directory.
  -f, --force                      Install formulae without checking for
                                   previously installed keg-only or non-migrated
                                   versions. When installing casks, overwrite
                                   existing files (binaries and symlinks are
                                   excluded, unless originally from the same
                                   cask).
  -v, --verbose                    Print the verification and postinstall steps.
  -n, --dry-run                    Show what would be installed, but do not
                                   actually install anything.
      --formula, --formulae        Treat all named arguments as formulae.
      --ignore-dependencies        An unsupported Homebrew development flag to
                                   skip installing any dependencies of any kind.
                                   If the dependencies are not already present,
                                   the formula will have issues. If you're not
                                   developing Homebrew, consider adjusting your
                                   PATH rather than using this flag.
      --only-dependencies          Install the dependencies with specified
                                   options but do not install the formula
                                   itself.
      --cc                         Attempt to compile using the specified
                                   compiler, which should be the name of the
                                   compiler's executable, e.g. gcc-7 for GCC
                                   7. In order to use LLVM's clang, specify
                                   llvm_clang. To use the Apple-provided
                                   clang, specify clang. This option will only
                                   accept compilers that are provided by
                                   Homebrew or bundled with macOS. Please do not
                                   file issues if you encounter errors while
                                   using this option.
  -s, --build-from-source          Compile formula from source even if a
                                   bottle is provided. Dependencies will still
                                   be installed from bottles if they are
                                   available.
      --force-bottle               Install from a bottle if it exists for the
                                   current or newest version of macOS, even if
                                   it would not normally be used for
                                   installation.
      --include-test               Install testing dependencies required to run
                                   brew test formula.
      --HEAD                       If formula defines it, install the HEAD
                                   version, aka. main, trunk, unstable, master.
      --fetch-HEAD                 Fetch the upstream repository to detect if
                                   the HEAD installation of the formula is
                                   outdated. Otherwise, the repository's HEAD
                                   will only be checked for updates when a new
                                   stable or development version has been
                                   released.
      --keep-tmp                   Retain the temporary files created during
                                   installation.
      --debug-symbols              Generate debug symbols on build. Source will
                                   be retained in a cache directory.
      --build-bottle               Prepare the formula for eventual bottling
                                   during installation, skipping any
                                   post-install steps.
      --bottle-arch                Optimise bottles for the specified
                                   architecture rather than the oldest
                                   architecture supported by the version of
                                   macOS the bottles are built on.
      --display-times              Print install times for each package at the
                                   end of the run.
  -i, --interactive                Download and patch formula, then open a
                                   shell. This allows the user to run
                                   ./configure --help and otherwise determine
                                   how to turn the software package into a
                                   Homebrew package.
  -g, --git                        Create a Git repository, useful for creating
                                   patches to the software.
      --overwrite                  Delete files that already exist in the prefix
                                   while linking.
      --cask, --casks              Treat all named arguments as casks.
      --[no-]binaries              Disable/enable linking of helper executables
                                   (default: enabled).
      --require-sha                Require all casks to have a checksum.
      --[no-]quarantine            Disable/enable quarantining of downloads
                                   (default: enabled).
      --adopt                      Adopt existing artifacts in the destination
                                   that are identical to those being installed.
                                   Cannot be combined with --force.
      --skip-cask-deps             Skip installing cask dependencies.
      --zap                        For use with brew reinstall --cask. Remove
                                   all files associated with a cask. May remove
                                   files which are shared between applications.
      --appdir                     Target location for Applications (default:
                                   /Applications).
      --colorpickerdir             Target location for Color Pickers (default:
                                   ~/Library/ColorPickers).
      --prefpanedir                Target location for Preference Panes
                                   (default: ~/Library/PreferencePanes).
      --qlplugindir                Target location for QuickLook Plugins
                                   (default: ~/Library/QuickLook).
      --mdimporterdir              Target location for Spotlight Plugins
                                   (default: ~/Library/Spotlight).
      --dictionarydir              Target location for Dictionaries (default:
                                   ~/Library/Dictionaries).
      --fontdir                    Target location for Fonts (default:
                                   ~/Library/Fonts).
      --servicedir                 Target location for Services (default:
                                   ~/Library/Services).
      --input-methoddir            Target location for Input Methods (default:
                                   ~/Library/Input Methods).
      --internet-plugindir         Target location for Internet Plugins
                                   (default: ~/Library/Internet Plug-Ins).
      --audio-unit-plugindir       Target location for Audio Unit Plugins
                                   (default:
                                   ~/Library/Audio/Plug-Ins/Components).
      --vst-plugindir              Target location for VST Plugins (default:
                                   ~/Library/Audio/Plug-Ins/VST).
      --vst3-plugindir             Target location for VST3 Plugins (default:
                                   ~/Library/Audio/Plug-Ins/VST3).
      --screen-saverdir            Target location for Screen Savers (default:
                                   ~/Library/Screen Savers).
      --language                   Comma-separated list of language codes to
                                   prefer for cask installation. The first
                                   matching language is used, otherwise it
                                   reverts to the cask's default language. The
                                   default value is the language of your system.
  -q, --quiet                      Make some output more quiet.
  -h, --help                       Show this message.

Error: Invalid usage: This command requires at least 1 formula or cask argument.

・Cmakeの再インストール→特に変化はなかったです

0 likes

1Answer

まず arch -arm64 brew install cmake を実行し、次に2.から cmake を消して実行してください。

1Like

Comments

  1. 前の質問でインストールができているようなので arch -arm64 brew install cmake は実行しなくてもいいです。
  2. @F_G

    Questioner

    返信ありがとうございます
    cmakeを消して2.を実行してみたのですが
    Error: An exception occurred within a child process:
    RuntimeError: /usr/local/opt/berkeley-db not present or broken
    Please reinstall berkeley-db. Sorry :(

    とエラーが出てしまいました...
  3. arch -arm64 brew install berkeley-db を実行すると動くかもしれません。
  4. @F_G

    Questioner

    Warning: git 2.39.2 is already installed and up-to-date.
    To reinstall 2.39.2, run:
    brew reinstall git
    dyld[80473]: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
    Referenced from: <9E9C9057-D239-3743-8BB6-2644A31DD326> /usr/local/Cellar/git/2.39.2/bin/git
    Reason: tried: '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/lib/libintl.8.dylib' (no such file), '/usr/lib/libintl.8.dylib' (no such file, not in dyld cache)
    /usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 32: 80473 Abort trap: 6 "${GIT_EXECUTABLE}" "$@"
    Warning: No remote 'origin' in /usr/local/Homebrew, skipping update!
    dyld[80475]: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
    Referenced from: <9E9C9057-D239-3743-8BB6-2644A31DD326> /usr/local/Cellar/git/2.39.2/bin/git
    Reason: tried: '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/lib/libintl.8.dylib' (no such file), '/usr/lib/libintl.8.dylib' (no such file, not in dyld cache)
    /usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 32: 80475 Abort trap: 6 "${GIT_EXECUTABLE}" "$@"
    Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask, skipping update!
    dyld[80477]: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
    Referenced from: <9E9C9057-D239-3743-8BB6-2644A31DD326> /usr/local/Cellar/git/2.39.2/bin/git
    Reason: tried: '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/lib/libintl.8.dylib' (no such file), '/usr/lib/libintl.8.dylib' (no such file, not in dyld cache)
    /usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 32: 80477 Abort trap: 6 "${GIT_EXECUTABLE}" "$@"
    Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core, skipping update!
    Warning: berkeley-db 18.1.40_1 is already installed, it's just not linked.
    To link this version, run:
    brew link berkeley-db
    と出たのですがこれは良いのでしょうか?
  5. @F_G

    Questioner

    その後色々やったらできました
    ありがとうございます

Your answer might help someone💌