LoginSignup
11
8

More than 5 years have passed since last update.

phpbrew install時OpenSSLが見つからない場合

Last updated at Posted at 2015-04-05

現象

$ phpbrew install 5.6.6 +default +mysql

で php5.6.6をインストールしてみようと試みたところ

configure: error: Cannot find OpenSSL's libraries

とインストールログにOpenSSLが見つからないと言われました

現象が起きた環境

$ cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
$ arch
x86_64

OpenSSLのロード先

phpbrewのデフォルトのロード先は確か

/usr/lib/

だった気がするので
読み込み先を指定するようにしてあげます。
yumかつ64bit環境でOpenSSLを入れている場合付加するパラメータは下記の通り
※ 自分でコンパイルして導入したひとは任意の値に変更してください

+openssl=/usr -- --with-libdir=lib64

パスを指定してインストールを行う

    $ phpbrew install 5.6.6 +default +mysql +openssl=/usr -- --with-libdir=lib64

        # brew で入れてる人向け
    $ phpbrew install 5.6.6 +default +mysql +openssl=$(brew --prefix openssl)
===> phpbrew will now build 5.6.6
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: b198117ee1d44c8143e030cee15f1b52
===> Distribution file was successfully extracted, skipping...
Found existing build.log, renaming it to /home/dimgraycat/.phpbrew/build/php-5.6.6/build.log.1428205834
===> Configuring 5.6.6...
...(中略)...
Congratulations! Now you have PHP with 5.6.6 as php-5.6.6
To use the newly built PHP, try the line(s) below:

    $ phpbrew use php-5.6.6

Or you can use switch command to switch your default php to php-5.6.6:

    $ phpbrew switch php-5.6.6

Enjoy!

ということで、インストール成功です

2016.12.05: 追記)
かれこれ1年以上たつみたいですが、まだこの減少は起きてるのかな?

2017.08.08: 追記)
macな人はbrewでopensslのリンクが貼れなくなっているので、
+openssl=$(brew --prefix openssl) にすることで対応できます。

11
8
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
11
8