不久前,我在 Mac 上安装了 Homebrew,我担心我安装不当,导致 Brew 无法正常工作。我可以从终端运行某种命令来检查一切是否正常工作?
我担心它设置不正确有两个原因:
brew search,并为他提供了可以安装的软件包列表。但是当我运行命令时,我收到错误消息This command requires at least 1 text or regex argument.这正常吗?安装OpenJDK和Temurin桶(测试第一个,然后测试另一个)后,在从终端运行一个简单的示例 javafx 应用程序时,我仍然遇到这样的错误:
Example.java:1: error: package javafx.application does not exist
Run Code Online (Sandbox Code Playgroud)
在我看来,JavaFX 并未包含在 macOS 的 OpenJDK 中,至少是 Homebrew 版本中,但它应该包含在内。
我正在安装的版本是 17,在这两个方面都是如此。
我可以做什么来解决这个问题?(我特别不想安装 Oracle 的 JDK,以避免未来高额的许可费用或潜在的诉讼,而 Oracle 以此而闻名。)
运行 PHP@7.2 需要该库的 2.5.0 版本,否则我会收到此错误:
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.5.0.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Run Code Online (Sandbox Code Playgroud)
如果我尝试典型的brew reinstall openldap libiconv解决方案,则会安装 PHP 7.2 不会使用的 2.6.0。
我已经尝试过brew install openldap@2.5.0,但那不起作用。
如何在我的系统上恢复旧版本 2.5.0?
更新brew时遇到以下超时错误。
bhupendra@Bhupendras-MBP mobile-app % brew update                                        
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Operation timed out
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Operation timed out
Error: Fetching /usr/local/Homebrew failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
Run Code Online (Sandbox Code Playgroud)
如果有人有解决方案,请帮忙。
pg我正在M1 macbook pro 上的 mac osx 12.5 上安装gem。Ruby 打包程序在运行时找不到 libpq gem install pg:
current directory: /Users/me/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/pg-1.4.4/ext
/Users/me/.rbenv/versions/3.1.2/bin/ruby -I /Users/me/.rbenv/versions/3.1.2/lib/ruby/site_ruby/3.1.0 extconf.rb
Calling libpq with GVL unlocked
checking for pg_config... yes
Using config values from /opt/homebrew/opt/libpq/bin/pg_config
checking for whether -Wl,-rpath,/opt/homebrew/opt/libpq/lib is accepted as LDFLAGS... yes
Using libpq from /opt/homebrew/opt/libpq/lib
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't …Run Code Online (Sandbox Code Playgroud) 在 macos 中,使用 charlock_holmes gem 的 Rails 项目可能会抛出如下错误:
/Users/iwan/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': dlopen(/Users/iwan/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/charlock_holmes-0.7.7/lib/charlock_holmes/charlock_holmes.bundle, 0x0009): Library not loaded: '/opt/homebrew/opt/icu4c/lib/libicudata.71.dylib' (LoadError)
  Referenced from: '/Users/iwan/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/charlock_holmes-0.7.7/lib/charlock_holmes/charlock_holmes.bundle'
  Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicudata.71.dylib' (no such file), '/usr/local/lib/libicudata.71.dylib' (no such file), '/usr/lib/libicudata.71.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/72.1/lib/libicudata.71.dylib' (no such file), '/usr/local/lib/libicudata.71.dylib' (no such file), '/usr/lib/libicudata.71.dylib' (no such file) - /Users/iwan/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/charlock_holmes-0.7.7/lib/charlock_holmes/charlock_holmes.bundle
  from /Users/iwan/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
  from /Users/iwan/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/charlock_holmes-0.7.7/lib/charlock_holmes.rb:1:in `<main>'
...
Run Code Online (Sandbox Code Playgroud) 不太明白发生了什么事。我只是想在我的 M1 mac 上安装一个新的 ruby 版本,以便在需要与我所拥有的 ruby 版本不同的存储库上运行简单的捆绑安装。最终重新安装了brew和rbenv并最终出现以下情况。
如果我运行brew install mysql,它会成功。还有brew install openssl。
当我运行捆绑安装时,我陷入了通常出现的问题点:
获取 mysql2 0.5.3 安装带有本机扩展的 mysql2 0.5.3
我也跑成功了
gem install mysql2 -v '0.5.3' -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include
Run Code Online (Sandbox Code Playgroud)
错误是:
ld:未找到架构 x86_64 的符号
如果我运行gcc -v我得到
Apple clang version 14.0.0 (clang-1400.0.29.202).  
Target: arm64-apple-darwin22.3.0.   
Thread model: posix.  
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Run Code Online (Sandbox Code Playgroud)
而且在错误之前我有很多警告,其中:
linking shared-object mysql2/mysql2.bundle
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: warning: directory not found for option '-L/usr/local/opt/ruby/lib'
ld: warning: ignoring …Run Code Online (Sandbox Code Playgroud) 我找不到要安装的Java 12,只有Java13。但是Gradle还不支持Java 13,因此我现在需要使用12作为替代。当我使用Homebrew brew search java查找时,会发现各种Java:Java 11,Java 6(!)和Java,它们以前是Java 12,现在是Java 13。
知道如何获得Java 12吗?
我正在尝试在我的带有 Apple A1 芯片的新 Macbook Pro 上安装 HD-Wallet Derive。为此,我需要安装最新版本的 PHP(目前为 7.3)所以当我brew install php@7.3在终端(zsh)上点击此命令时,我收到此错误消息:Error: php@7.3: no bottle available!
您可以尝试从源代码安装: brew install --build-from-source php@7.3 请注意不支持从源代码构建。您会遇到一些公式的构建失败。如果您遇到任何问题,请创建拉取请求,而不是在 Homebrew 的 GitHub、Twitter 或任何其他官方渠道上寻求帮助。
我正在从源头构建它。使用这个回购。https://github.com/dan-da/hd-wallet-derive#installation-and-running  我能执行此命令curl https://getcomposer.org/installer -o installer.php,这php installer.php成功。但是当我运行这个php composer.phar install
我收到此错误:未找到锁定文件。更新依赖项而不是从锁定文件安装。如果您没有锁定文件,请使用 composer update 而非 composer install。
使用包信息加载 Composer 存储库 更新依赖项 您的需求无法解析为一组可安装的包。
问题 1 - mdanter/ecc[v0.5.0, ..., 0.5.x-dev] 需要 ext-gmp * -> 它从您的系统中丢失。安装或启用 PHP 的 gmp 扩展。- bitwasp/bitcoin dev-master 需要 mdanter/ecc ^0.5.0 -> 可满足 mdanter/ecc[v0.5.0, v0.5.1, v0.5.2, …