要約
brew doctor
でopenssl@1.1
が非推奨と警告が表示されたので対応しました。- 参考記事を元に
perl
を更新しましたが、警告表示は変わらなかったため、依存関係を確認してexpect
を再インストールすることで対応しました。
注意事項
- 以下は利用環境に依存しますので参考記事も確認して慎重に実行してください。
- 最新の
perl
を使用することについてはデメリットはないと思いますが、自己責任でお願いします。(openssl@1.1
アンインストール時のエラー出力を確認してください。) - homebrewで管理していないコマンドも影響を受ける可能性があるので注意してください。(多くのコマンドは
openssl@3
に対応してると思いますが。)
実行環境
% sw_vers ProductName: macOS ProductVersion: 13.6.1 BuildVersion: 22G313 % brew --version Homebrew 4.1.17
現象
openssl@1.1
でdeprecated
と表示されていました。
% brew update Already up-to-date. % brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks! Warning: Some installed formulae are deprecated or disabled. You should find replacements for the following formulae: openssl@1.1
公式
対応
参考記事を元にperl
のインストールとopenssl@1.1
のアンインストールを実施
参考記事:
% perl --version This is perl 5, version 30, subversion 3 (v5.30.3) built for darwin-thread-multi-2level (with 2 registered patches, see perl -V for more detail) Copyright 1987-2020, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. % type perl perl is /usr/bin/perl % brew install perl ==> Downloading https://formulae.brew.sh/api/formula.jws.json ==> Downloading https://formulae.brew.sh/api/cask.jws.json ######################################################################### 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/perl/manifests/5.38.0 ######################################################################### 100.0% ==> Fetching dependencies for perl: berkeley-db ==> Downloading https://ghcr.io/v2/homebrew/core/berkeley-db/manifests/18.1.40_2 ######################################################################### 100.0% ==> Fetching berkeley-db ==> Downloading https://ghcr.io/v2/homebrew/core/berkeley-db/blobs/sha256:a6b047 ######################################################################### 100.0% ==> Fetching perl ==> Downloading https://ghcr.io/v2/homebrew/core/perl/blobs/sha256:db18bcd070562 ######################################################################### 100.0% ==> Installing dependencies for perl: berkeley-db ==> Installing perl dependency: berkeley-db ==> Downloading https://ghcr.io/v2/homebrew/core/berkeley-db/manifests/18.1.40_2 Already downloaded: $HOME/Library/Caches/Homebrew/downloads/dad399d41acac3c682869c3c11caa898079e60cc1336af2d7ec80b5538bddfb6--berkeley-db-18.1.40_2.bottle_manifest.json ==> Pouring berkeley-db--18.1.40_2.ventura.bottle.tar.gz 🍺 /usr/local/Cellar/berkeley-db/18.1.40_2: 44 files, 5.9MB ==> Installing perl ==> Pouring perl--5.38.0.ventura.bottle.tar.gz ==> Caveats By default non-brewed cpan modules are installed to the Cellar. If you wish for your modules to persist across updates we recommend using `local::lib`. You can set that up like this: PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" cpan local::lib And add the following to your shell profile e.g. ~/.profile or ~/.zshrc eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)" ==> Summary 🍺 /usr/local/Cellar/perl/5.38.0: 2,504 files, 67.8MB ==> Running `brew cleanup perl`... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). ==> Caveats ==> perl By default non-brewed cpan modules are installed to the Cellar. If you wish for your modules to persist across updates we recommend using `local::lib`. You can set that up like this: PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" cpan local::lib And add the following to your shell profile e.g. ~/.profile or ~/.zshrc eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"
perl
のインストール後にバージョン確認
% perl --version This is perl 5, version 38, subversion 0 (v5.38.0) built for darwin-thread-multi-2level Copyright 1987-2023, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at https://www.perl.org/, the Perl Home Page. % type perl perl is /usr/local/bin/perl
openssl@1.1
を強制的に削除する
% brew uninstall --ignore-dependencies openssl@1.1 Uninstalling /usr/local/Cellar/openssl@1.1/1.1.1w... (8,101 files, 18.5MB) Warning: The following openssl@1.1 configuration files have not been removed! If desired, remove them manually with `rm -rf`: /usr/local/etc/openssl@1.1 /usr/local/etc/openssl@1.1/cert.pem /usr/local/etc/openssl@1.1/ct_log_list.cnf /usr/local/etc/openssl@1.1/ct_log_list.cnf.dist /usr/local/etc/openssl@1.1/misc /usr/local/etc/openssl@1.1/misc/CA.pl /usr/local/etc/openssl@1.1/misc/tsget /usr/local/etc/openssl@1.1/misc/tsget.default /usr/local/etc/openssl@1.1/misc/tsget.pl /usr/local/etc/openssl@1.1/misc/tsget.pl.default /usr/local/etc/openssl@1.1/openssl.cnf /usr/local/etc/openssl@1.1/openssl.cnf.dist Warning: The following may be openssl@1.1 configuration files and have not been removed! If desired, remove them manually with `rm -rf`: /usr/local/etc/openssl /usr/local/etc/openssl@3
openssl@1.1
関連のファイルは記載の通り削除しました。
rm -rf /usr/local/etc/openssl@1.1
<補足>openssl@1.1
の代替について
opensslを確認するとopenssl@3
がインストールされていました。
ログは記録し忘れましたが、openssl@1.1
とopenssl@3
がインストールされていました。
openssl@1.1
は削除していたのでopenssl@3
のみ表示されています。
% brew list -1 | grep openssl* openssl@3
openssl@1.1
以外に公開されているopensslは以下でした。
差異がわからなかったので、差異とインストールについてchatgptで確認しました。
以下の差異があるようです。(2023/10/26時点)
openssl@3
はOpenSSLの最新バージョンで、現在の安定版は3.1.3です。このバージョンはFIPS 140-3準拠のFIPSプロバイダを含んでいます。openssl@3.0
はOpenSSLの前のバージョンで、これもFIPS準拠の暗号化モジュールを含んでいますが、後方互換性はありません。したがって、どちらをインストールするかは、あなたが使用するアプリケーションやシステムの要件によります。一部のアプリケーションは特定のバージョンのOpenSSLを必要とする場合があります。そのため、それらのアプリケーションが
openssl@3.0
に依存している場合は、openssl@3.0
をインストールすることをお勧めします。しかし、最新の機能やセキュリティ更新を利用するためには、openssl@3
(現在のバージョン3.1.3)をインストールすることをお勧めします。
私の環境ではopenssl@3
を使用し、openssl@3.0
は使用しない(追加インストールはしない)ことにしました。
再度brew doctor
を実行するもopenssl@1.1
に依存ありの警告が表示される
ここまでで警告表示は解消されると思いましたが消えませんでした。
% brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks! Warning: Some installed formulae are missing dependencies. You should `brew install` the missing dependencies: brew install openssl@1.1 Run `brew missing` for more details.
brew missing
コマンドを実行して依存関係を確認する
記載の通り依存関係を確認しました。
実行結果はexpect
のみでした。
Run `brew missing` for more details. % brew missing expect: openssl@1.1
念の為、brew uses
コマンドでopenssl@1.1に依存するパッケージを探す
実行結果はexpect
のみでした。
% brew uses --installed openssl@1.1 expect
openssl@1.1
がインスートされていることを確認する
expect
はhomebrewでインストールされていました。
% brew list -1 | grep expect expect
expect
を更新する
念の為、更新有無を確認します。
% brew upgrade expect Warning: expect 5.45.4_2 already installed
expect
を再インストールする
最新ですが念の為再インストールします。これは不要かもしれません。
% brew reinstall expect ==> Downloading https://ghcr.io/v2/homebrew/core/expect/manifests/5.45.4_2-2 ######################################################################### 100.0% ==> Fetching expect ==> Downloading https://ghcr.io/v2/homebrew/core/expect/blobs/sha256:25d93f37370 ######################################################################### 100.0% ==> Reinstalling expect ==> Pouring expect--5.45.4_2.ventura.bottle.2.tar.gz 🍺 /usr/local/Cellar/expect/5.45.4_2: 70 files, 767.5KB ==> Running `brew cleanup expect`... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
brew cleanup
でキャッシュを削除する
brew cleanup expect
が出力されているため実行します。結果、警告表示は解消しました。
% brew cleanup expect % brew doctor Your system is ready to brew.
まとめ
brew doctor
でopenssl@1.1
が警告表示される(deprecated)現象と解決方法について紹介しました。
homebrewで管理していないコマンドも影響を受ける可能性がありますが、openssl@1.1
は非推奨なのでエラー内容を確認し対応することをおすすめします。(多くのコマンドはopenssl@3
に対応してると思いますが。)