php-5.3.3のconfigureでエラー

このQ&Aのポイント
  • RHEL6にPHP5.3.3をソースインストールしようとすると、configure: error: DBA: Could not find necessary header file(s). というエラーが出ます。
  • RHEL5.5ではOKだったのに、RHEL6では通りません。
  • インストールされているパッケージが原因かと思っていますが、情報が見当たらず前に進めません。
回答を見る
  • ベストアンサー

php-5.3.3のconfigureでエラー

RHEL6にPHP5.3.3をソースインストール(訳あってrpmを使えない)しようとすると 下記のエラーが出て困ってます。 configure: error: DBA: Could not find necessary header file(s). configureは下記を指定してます。RHEL5.5ではOKだったのに6では通らない。 インストールされているパッケージが原因かと思っているのですが、情報が 見当たらず前に進めません。 同じ状況になった方助言をお願いします。 OS:Red Hat Enterprise Linux Server release 6.0 (Santiago) PHP:php-5.3.3.tar.gz configure:./configure \ --enable-track-vars \ --enable-trans-sid \ --with-mysql=/usr/local/mysql \ --with-gdbm \ --disable-debug --with-apxs2=/usr/local/apache/bin/apxs \ --enable-mbstring \ --enable-mbstr-enc-trans \ --with-mcrypt=/usr/local/lib \ --with-ldap=/usr ※Apache2、mysql、mcryptは正常にインストールされてます。 宜しくお願いします。

質問者が選んだベストアンサー

  • ベストアンサー
回答No.1

ググったら参考URLがヒットしました。 --with-gdbm つけて configure: error: DBA: Could not find necessary header file(s). と出たら、 gdbm-devel パッケージが入っていないのが原因とのことです。

参考URL:
http://dan.drydog.com/apache2php.html
omisoshil
質問者

お礼

gdbm-develのパッケージがRHEL6に入って無いんですねぇ~ gdbmはあるのですが。。。同じバージョンのdevelを探してインストールしてみました。 --with-gdbm外したいなぁ~ phpをrpmで入れる時はどーやってるのだろう? ありがとうございました。助かりました。

関連するQ&A

  • PHPのconfigureのオプションにつきまして

    日頃WindowsメインでLinuxをあまり使わない者です。 今回、とある理由でCentOS5.5にPHP5.2とMySQL4.0の環境を作る必要が出てきました。それで、それらをソースからコンパイルしてインストールしてみたのですが、PHPのmysql_connect()で以下のようなエラーが出て、原因がわからず困っています。 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (13) PHPもMySQLも単体では正常に動いているようです。データベースも作れました。 それで色々調べていたのですが、/tmp/mysql.sockのアクセス権限を777にしたり、 PHPとMySQLが/tmp/mysql.sockを介する設定になっているかを確認しましたが、いずれも問題無さそうです。 それで、phpinfo()の結果をさくらサーバーのそれと比べてみたところ、 Configure Commandのところが全然違うことがわかりました。 今回構築した環境では、 './configure' '--with-apxs2=/usr/sbin/apxs' '--with-mysql=/usr/local/mysql' ですが、 さくらサーバーは、 './configure' '--prefix=/usr/local/php/5.2' '--with-config-file-path=${prefix}/etc' '--with-config-file-scan-dir=${prefix}/etc/conf.d' '--enable-force-cgi-redirect' '--with-openssl=/usr/local/ssl' '--with-zlib=/usr' '--with-curl' '--enable-exif' '--with-pcre-dir=/usr/local' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-ttf' '--with-freetype-dir=/usr/local' '--with-gettext=/usr/local' '--with-gmp=/usr/local' '--with-iconv=/usr/local' '--enable-mbstring' '--with-mcrypt' '--with-mysql=/usr/local' '--with-mysqli=/usr/local/bin/mysql_config' '--with-pdo-mysql=/usr/local' '--with-snmp=/usr/local' '--enable-soap' '--with-xsl=/usr/local' '--enable-zip' と非常に多いです。 これらは関係あるでしょうか。初歩的な質問で恐縮ですが、ご存知の方がいらっしゃいましたら、ご教示いただけましたら助かります。 よろしくお願いします。

    • ベストアンサー
    • PHP
  • Linux PHPからSQLServerに接続できない

    Linuxにphpをインストールしたのですが別のWindowsServerのSQLServerに接続することができません。 LinuxにインストールしたMySQLのデータは参照できています。 なにかモジュールやドライバーなどが必要なのでしょうか? ちなみに別のWindowsから該当のSQLServerは接続できているのでホスト名、DB名、User名、Passwordは 正しいと思います。 以下は環境とphpインストール時のオプションです。 もし、不足しているものがあれば教えてください。よろしくお願いします。 ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --enable-mbregex --enable-trans-sid --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql Red Hat Linux 8.0 Apache 2.0.55 php-5.1.2

    • 締切済み
    • PHP
  • PHPのconfigureについて

    PHP5.2.6をインストールしようとしているのですが、configureコマンドの所で躓いています 実行しているconfigureオプションは以下の通りです。 ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --with-zlib --enable-bcmath --enable-mbregex --enable-mbstring とすると configure: error: libpng.(a|so) not found. となります。 yum install libpngとすると Package 2:libpng-1.2.10-7.1.el5_3.2.i386 already installed and latest version となるので最新版のようです。 このconfigure: error: libpng.(a|so) not found.を克服する術を教えて頂けると助かります。 何卒よろしくお願いします。

    • ベストアンサー
    • PHP
  • phpのインストールが上手く行きません

    お世話になります。 phpのインストールが上手く行きません。 make install で下記メッセージが出力し停止します。 [activating module `php4' in /usr/local/apache/conf/httpd.conf] cp libs/libphp4.so /usr/local/apache/libexec/libphp4.so cp: cannot stat `libs/libphp4.so': そのようなファイルやディレクトリはありません apxs:Break: Command failed with rc=1 make[1]: *** [install-sapi] エラー 1 make[1]: 出ます ディレクトリ `/usr/local/src/php-4.2.2' make: *** [install-recursive] エラー 1 phpインストールにあたり下記を実施いたしました。 OSはRedHat7.2です。 > apache1.3.24インストール # ./configure --enable-shared=max --enable-module=so # make # make install # /usr/local/apache/bin/httpd -l Compiled-in modules:  http_core.c  mod_so.c suexec: enabled; valid wrapper /usr/sbin/suexec > php4.2.2インストール $ tar xvzf php-4.2.2.tar.gz $ cd php-4.2.2/ext $ cp /****/php4_mbregex-1.3.1.tar.gz . $ tar xvzf php4_mbregex-1.3.1.tar.gz $ cd .. $ rm configure $ ./buildconf $ ./configure --with-pgsql \ --enable-track-vars \ --with-apxs=/usr/local/apache/bin/apxs \ --enable-versioning \ --enable-trans-sid \ --enable-mbstring \ --enable-mbstr-enc-trans \ --enable-mbregex $ make $ su # make install 最後のmake installが上記エラーをはいて停止してしまいます。 apacheを入れ直したりphpのバージョンを変えて試しましたが駄目でした。 apxsも/usr/local/apache/bin/の中にあります。 なにが悪いのか私ではさっぱり解りませんので どなたかご教授して頂ければと思います。。。 宜しくお願い致します。m(__)m

    • ベストアンサー
    • PHP
  • php5.0.5 について

    apache2+php5.0.5で、 ./configure ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring makeすると、 configure:error: libxml2 version 2.5.0 or greater required. となるのですが、どうしてでしょうか? このままインストールしていいのでしょうか? 教えてください。宜しくお願いします。

    • ベストアンサー
    • PHP
  • Apache OpenSSL PHP でエラー

    CentOS 5.1にOpenSSL-0.9.8g、httpd-2.0.61、Postgres8.1.10、php-5.2.5でWEBサーバを作っているのですが、不思議なエラーが出てうまくいきません。 現象としては以下の通りです。 htdocs_http = httpコンテンツ htdocs = httpsコンテンツ apacheをstartsslで起動して、htdocsにphpinfoを 出力するプログラムを作成した後アクセスすると コンテンツのTOPに Keep-Alive: timeout=15, max=98 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html ae03 などのメッセージが出力されます。 Apacheとphpを何度も再インストールしたのですが解決できません。 誰か似たような現象を起こった方や、 解決策を知っている方教えていただけませんか。 インストールした順は以下の通りです。 1. OpenSSL 2. httpd 3. Postgres 4. php インストールしたオプション 1. OpenSSL # ./config -fPIC shared 参考にしたサイト http://uguisu.skr.jp/Windows/apache2.html 2. Apache # ./configure \ # --enable-so --enable-ssl --with-ssl=/usr/local/ssl 3. Postgres # ./configure のみのオプションなし。 4. php # ./configure \ # --enable-mbstring=all --enable-mbregex \ # --enable-sockets --enable-ftp \ # --with-apxs2=/usr/local/apache2/bin/apxs \ # --with-pgsql=/usr/local/pgsql --without-mysql \ # --with-gd --enable-gd-native-ttf \ # --with-freetype-dir=/usr --with-jpeg-dir=/usr \ # --with-zlib=/usr --with-png-dir=/usr \ # --with-imap=/usr --with-kerberos=/usr \ # --with-imap-ssl --with-pdo-pgsql=/usr/local/pgsql \ # --with-mcrypt=/usr/local

    • 締切済み
    • PHP
  • PHPのconfigureでmysqlエラーが

    CentOS 5 x86_64上でapache+php+mysqlのサーバ構築中ですが、どうもうまくいきません。 apacheとphpでconfigureのオプションを付けてインストールしたいので、rpm -eでhttpdとphpをアンインストールしたうえで、apacheとphpをmake installしようとしました。 apacheはうまくinstallできたのですが、phpはconfigureでエラーが出てしまいます。 以前Cent OS 5.2(32bit)でやった時は問題なかったのですが・・・ ↓configure時のエラーメッセージ -------------------- checking for mSQL support... no checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. -------------------- ↓config.logのエラーメッセージ -------------------- configure:60440: checking for mysql_error in -lmysqlclient configure:60459: gcc -o conftest -I/usr/include -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib -Wl,-rpath,/usr/kerberos/lib64 -L/usr/kerberos/lib64 -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient -lz -lfreetype -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz -lxml2 -lz -lm 1>&5 /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient /usr/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status configure: failed program was: #line 60448 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_error(); -------------------- ↓apacheのconfigure ------------------------- ./configure --enable-layout=Apache --disable-autoindex --disable-status --disable-userdir --enable-modules=so --enable-mods-shared=max --enable-ssl --with-ssl=/usr/share/ssl --enable-rewrite=shared --enable-ext-filter ------------------------- ↓phpのconfigure ------------------------- ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --enable-mbregex --enable-gd-native-ttf --with-gd --with-ttf --with-jpeg-dir --with-freetype-dir --with-png-dir --with-zlib --with-curl --with-openssl --with-mysql ------------------------- バージョンは apache:2.2.11 php:5.2.10, 5.3.0の両方で試しましたが結果は同じ mysql-5.0.45-7.el5.x86_64 mysql-devel-5.0.45-7.el5.x86_64 です。 どなたかご教授いただけますと助かります・・・

  • PHPのCGIモードとについて

    PHPのCGIモードとについて PHPのCGIモードというのがよく分かりません。 自分はcentOSにソースコードからPHPを入れております。 で、主にApacheと連携させています。 ただ、最近は #!/usr/local/bin/php -q などを最初に書いてコマンドラインからの使用が多くなっております。 自分は ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-freetype-dir=/usr/local/lib --with-gd --with-mysqli=/usr/local/mysql5.5/bin/mysql_config --with-pdo-mysql=/usr/local/mysql5.5 --with-mysql-sock=/var/lib/mysql/mysql.sock --with-zlib --with-xsl=/usr/lib --enable-mbregex --enable-mbstring --enable-bcmath --with-mcrypt --disable-posix-threads --enable-bcmath --with-readline --with-curl=/usr/local/curl --with-curlwrappers --with-openssl --with-openssl-dir=/usr/lib64/openssl --enable-pcntl のようにしているのですが、これでCGIモードにはなっているのでしょうか? いまいち概念が掴めないでおります。 具体的な事例や、CGIモードでない場合との違いなどを教えていただけないでしょうか? また、CGIモードにするために何かphp.ini等で設定をするような事があるのであれば、 どのようにしてCGIモードとして使えるようになるのかをアドバイスいただきたいと思います。

    • ベストアンサー
    • PHP
  • phpのConfigure Commandについて

    ocnのサーバーにphpをvinstallでインストールしたのですが ocn標準で用意されているのは、データベースへアクセスする言語としてのみ利用できる内容になっているようです。 その後のカスタマイズは可能なので、機能を増やしたいのです。 参考になるか分かりませんが、 phpinfo()で表示させると、configure commandの内容が ./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/usr/local/lib' '--disable-debug' '--enable-memory-limit' '--enable-zend-multibyte' '--with-regex=system' '--enable-mbstring=all' '--enable-mbregex' '--enable-dio' '--enable-calendar' '--enable-versioning' '--with-bz2=shared,/usr' '--enable-sockets=shared' '--with-pcre-regex=/usr/local' '--with-iconv=shared,/usr/local' '--with-gdbm=shared' '--with-db3=shared,/usr/local' '--with-gettext=/usr/local' '--with-curl=shared,/usr/local' '--with-openssl=shared,/usr' '--with-pgsql=shared,/usr/local' '--with-openssl=/usr' '--with-gd=shared' '--enable-gd-native-ttf=shared' '--with-freetype-dir=shared,/usr/local' '--with-ttf=shared,/usr/local' '--with-xpm-dir=/usr/X11R6' '--with-jpeg-dir=shared,/usr/local' '--with-png-dir=shared,/usr/local' '--with-t1lib=shared,/usr/local' '--with-zlib=/usr' こんな感じになっています。 この内容で分かりますか? どなたかご教授宜しくお願いいたします。

  • PHPモジュールが読み込めない?

    Linuxでサーバーを構築しようと思い、三日三晩試行錯誤してみたのですがどうしてもわからない事があるので質問させていただきます。 Apache、PHPのインストールはエラーなく行えたのですがPHPのインストール後、httpd.confにAddModule文を追加するとApache再起動時に指定したモジュールが見つからない節のエラーが出ます。 ApacheのModuleディレクトリやLibディレクトリ等を探してみたのですが.soファイルが見つかりません。 phpのconfigure時に「CGIとして動作します」的なメッセージが表示されてたのですがそのせいでしょうか? ./configure --prefix=/usr/local/php-5.2.1\ --enable-mbstring\ --with-apxs2=/usr/local/httpd/bin/apxs\ --with-mysql=/usr/local/mysql\ --with-gd --with-zlib --with-jpeg-dir 実行環境 FedoraCore6 Apache-2.2.4 PHP-5.2.1 PHP-4.4.6でもためしてみたのですがうまくいきませんでした。 どなたか原因がわかる方がいたらご教授お願いできませんでしょうか? 初歩的な事で申し訳ないのですがよろしくお願いします。

    • ベストアンサー
    • PHP