LoginSignup
8
5

More than 5 years have passed since last update.

phpenvでphpをインストールしている時にopensslエラーが出る場合の解決メモ

Last updated at Posted at 2016-02-20

phpenvインストールはこちら

上記記事では成功していますが、セカンドPCにphpenvでphpをインストールしている時にbuild errorが発生したので解決方法のメモです。

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
                                                         ^
/var/tmp/php-build/source/5.3.29/ext/libxml/libxml.c:455:22: warning: assigning to 'char *' from 'xmlChar *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
                error_copy.message = xmlStrdup(msg);
                                   ^ ~~~~~~~~~~~~~~
5 warnings generated.
/var/tmp/php-build/source/5.3.29/ext/openssl/openssl.c:40:10: fatal error: 'openssl/evp.h' file not found
#include <openssl/evp.h>
         ^
1 error generated.
make: *** [ext/openssl/openssl.lo] Error 1
-----------------------------------------

こんなのが出てきました。opensslはbrewでインストールされている状態です。

$ brew upgrade openssl
Error: openssl 1.0.2f already installed

上記の記事にもあるのですが、

$ brew link openssl --force

brew linkでシンボリックリンクを作成し直すことで解決しました。

8
5
0

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