Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

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

More than 3 years have passed since last update.

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 するとバイナリ版のダウンロードではなく、
ソースのダウンロードとビルドが行われるんですね...

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away