9
8

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 5 years have passed since last update.

phpbrew installでビルド関係のエラーが出るとき

Posted at

phpbrewをインストールした後

$ phpbrew install php-7.0.8 +default

を実行すると、phpのビルド関係のエラーが続出
(結論としてはphpのビルドに必要なツールが足りなかっただけ)

##そもそもcコンパイラない

Error: Configure failed:
The last 5 lines in the log file:
checking for cc... no

checking for gcc... no

configure: error: in `/root/.phpbrew/build/php-7.0.8':

configure: error: no acceptable C compiler found in $PATH

gccインストール

$ yum install gcc

##libxml2ないっす

Error: Configure failed:
The last 5 lines in the log file:
checking for strftime... (cached) yes

checking whether to enable LIBXML support... yes

checking libxml2 install dir... no

checking for xml2-config path... 

configure: error: xml2-config not found. Please check your libxml2 installation.

libxml2インストール

$ yum install libxml2-devel

##BZip2ねーよ

Error: Configure failed:
The last 5 lines in the log file:
checking for gzgets in -lz... yes

checking whether to enable bc style precision math functions... yes

checking for BZip2 support... yes

checking for BZip2 in default path... not found

configure: error: Please reinstall the BZip2 distribution

BZip2インストール

$ yum install bzip2-devel

##mcryptのヘッダーが見つからないってさ

Error: Configure failed:
The last 5 lines in the log file:
checking for alloca... (cached) yes

checking for working memcmp... yes

checking for stdarg.h... (cached) yes

checking for mcrypt support... yes

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

libmcryptインストール

$ yum install libmcrypt-devel

##readlineのへっだーないっす

Error: Configure failed:
The last 5 lines in the log file:
checking for utsname.domainname... yes

checking for PSPELL support... no

checking for libedit readline replacement... no

checking for readline support... yes

configure: error: Please reinstall readline - I cannot find readline.h

readlineインストール

$ yum install readline-devel

##まとめ
phpのビルドに必要なツールを事前にインストールしておきましょうというお話だった。
phpbrew install するとバイナリ版のダウンロードではなく、
ソースのダウンロードとビルドが行われるんですね...

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?