1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

phpbrew を使って install しようとすると openssl 周りのエラーが起きる

Posted at

これは小ネタです


タイトル通りのトラブルが起きた時の解消法です。
端的に言うと、openssl@3をインストールしてるとエラーが起こります。

エラー内容

 error: use of undeclared identifier 'RSA_SSLV23_PADDING'
        REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);

 warning: 'RSA_new' is deprecated [-Wdeprecated-declarations]

だいたいこういうエラーが出てしまいます(openssl@3をインストールしてると)

そう言う時は、下記コマンドを打ちましょう(PHP8 をインストールする場合)

OPENSSL_CFLAGS="-I/usr/local/opt/openssl@1.1/include" \
OPENSSL_LIBS="-L/usr/local/opt/openssl@1.1/lib -lcrypto -lssl" \
phpbrew install 8.0 +default

コマンド掲載元:
https://github.com/phpbrew/phpbrew/issues/1249

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?