• 締切済み

LinuxにPHPをソースからインストールできない・・・

Linuxを四苦八苦しながら触り始めて、一週間となります。 会社のLinuxにPHPをインストールしようかと思ったのですが、コンパイルエラーからなかなか進めません。 Linux Red Hat Enterprise Linux 4 RPM httpd httpd-2.0.52-9.ent httpd-devel-2.0.52-9.ent httpd-suexec-2.0.52-9.ent system-config-httpd-1.3.1-1 httpd-manual-2.0.52-9.ent RPM版のPHPは既にアンインストール済みです。 mysqlはソースでインストール済みです。 apxsの場所 /usr/sbin/apxs # perl -v This is perl, v5.8.5 built for i386-linux-thread-multi $PATH確認 /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin ソールからインストールしたいPHPは4.4.6です エラー内容 # ./configure --with-apxs2=/usr/sbin/apxs (中略) Configuring SAPI modules checking for AOLserver support... no checking for Apache 1.x module support via DSO through APXS... no checking for Apache 1.x module support... no checking for mod_charset compatibility option... no checking for Apache 2.0 filter-module support via DSO through APXS... no checking for Apache 2.0 handler-module support via DSO through APXS... Sorry, I cannot run apxs. Possible reasons follow: 1. Perl is not installed 2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs 3. Apache was not built using --enable-so (the apxs usage page is displayed) The output of /usr/sbin/apxs follows: Can't exec "/usr/bin/apr-config": No such file or directory at /usr/sbin/apxs line 48. Use of uninitialized value in scalar chomp at /usr/sbin/apxs line 53. -O2 -g -pipe -m64 apxs:Error: /usr/bin/apr-config not found!. configure: error: Aborting apr-config がない(?)と言われているようなのですが、aprを探したところなさそうです。 aprをインストールすればいいのでしょうか? ネットで探してみたのですが、解決方法はなかなか見つからず・・・。 できれば、apacheはこのまま使用したいのですが。 なにか解決法やアドバイスがあれば、よろしくお願いいたします。

みんなの回答

  • xjd
  • ベストアンサー率63% (1021/1612)
回答No.1

こんばんは。 >apxs:Error: /usr/bin/apr-config not found!. apr-configは、apr-develパッケージに含まれていますのでインストールしてみて下さい。 >ネットで探してみたのですが、解決方法はなかなか見つからず・・・。 ネット検索など必要ありません。 パッケージ検索コマンドを使えば、apr-configコマンドがどのパッケージに含まれるか すぐにわかるはずです。 # which apr-config /usr/bin/apr-config # rpm -qif /usr/bin/apr-config Name    : apr-devel          Relocations: (not relocatable) Version   : 0.9.4            Vendor: CentOS Release   : 24.5.c4.2          Build Date: 2006年08月13日 19時50分21秒 Install Date: 2007年03月06日 22時11分32秒 Build Host: build-i386

全文を見る
すると、全ての回答が全文表示されます。

関連するQ&A

  • PHPのインストール

    いつも拝見しております。 環境:Red Hat Enterprise Linux ES v.4 32bit/EM64T PHPをソースからインストールしようと思いますが configure でエラーが出てしまいます。 ./configure \ --enable-mbstring \ --enable-mbregex \ --enable-track-vars \ --with-apxs=/usr/sbin/apxs \ --with-mysql=/usr/local/mysql 以下エラーです。 ---------- Configuring SAPI modules checking for AOLserver support... no checking for Apache 1.x module support via DSO through APXS... Sorry, I was not able to successfully run APXS. Possible reasons: 1. Perl is not installed; 2. Apache was not compiled with DSO support (--enable-module=so); 3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs The output of /usr/sbin/apxs follows ./configure: line 3558: /usr/sbin/apxs: No such file or directory configure: error: Aborting ---------- configure の4つ目でのエラーのようですが、 対処方法がわかりません。 パスが違うようですが、どうやってパスを探せばよろしいですか? ご教授お願いいたします。

  • CentOS5.2にPHP4.4.9をインストールしたいんですが。。。

    CentOS5.2にPHP4.4.9をインストールしたいんですが。。。 $ tar -zxvf php-4.4.9.tar.gz; cd php-4.4.9 ファイルを展開した後に $ ./configure --with-apxs2=/usr/bin/apxs --enable-mbstring --with-mysql --with-gd --with-jpeg=/usr/lib --with-png=/usr/lib を実行しましたが。 # ./configure --with-apxs2=/usr/bin/apxs --enable-mbstring --with-mysql --with-gd --with-jpeg=/usr/lib --with-png=/usr/lib loading cache ./config.cache checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking host system type... i686-pc-linux-gnu checking for gcc... no checking for cc... no configure: error: no acceptable cc found in $PATH このようになってしまい何をしていいか分かりません。どなたか教えて下さい。 参考URL http://d.hatena.ne.jp/donbulinux/20090304/1236160239

  • redhat9でxineをインストールしようとして・・・

    redhat9でxineをインストールしようとしています。 xine-lib-1.0で「./configure」を実行すると、下記のエラーがでます。 checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking for gcc... no checking for cc... no checking for cc... no checking for cl... no configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. gccがインストールされていないのかなと思い、「rpm -qa | grep gcc」とすると、 compat-gcc-7.3-2.96.118 libgcc-3.2.2-5 compat-gcc-c++-7.3-2.96.118 とでますので、パスが通ってないと思うのですが、違うのでしょうか?それともインストールされてないのでしょうか?ちなみに「echo $PATH」とすると /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/lib と出ます。

  • Fedora Core3でApacheのインストール

    お世話になります。 これからLinuxを勉強しようと思い、Fedora Core3 をインストールをしまして、Apache2をFedora Core3の パッケージではなく、他のCDからインストールを しようとしましたら、うまくいかずに困っています。 原因はどのようなことなのでしょうか。 よろしくお願いいたします。 コマンド文はこのようになっていました。 [root@localhost httpd-2.0.50]# ./configure --enable-so checking for chosen layout... Apache checking for working mkdir -p... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu Configuring Apache Portable Runtime library ... checking for APR... reconfig configuring package in srclib/apr now checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu Configuring APR library Platform: i686-pc-linux-gnu checking for working mkdir -p... yes APR Version: 0.9.5 checking for chosen layout... apr checking for gcc... no checking for cc... no checking for cc... no checking for cl... no configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. configure failed for srclib/apr [root@localhost httpd-2.0.50]# make make: *** ターゲットが指定されておらず、makefile も見つかりません。中止。 [root@localhost httpd-2.0.50]#

  • Apacheのバージョンアップでエラー

    既存Apache2.2.15から2.2.22へマイナーバージョンアップをやってみたのですが、 途中でエラーが表示されてしまいました。 すみません。エラーの理由が分かれば教えていただけないでしょうか。 OSはCentOS6です。 #cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bk(バックアップ) #/usr/bin/apachectl stop #tar zxvf ./httpd-2.2.22.tar.gz (ダウンロードしたものを展開) #cd httpd-2.2.22 #./configure --prefix=/etc/httpd #./configureまで来て、以下のエラーが表示されました。 又、makeをしようとしても当然configureの設定が終了していないので エラーになっていると思われます。 checking for chosen layout... Apache checking for working mkdir -p... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu Configuring Apache Portable Runtime library ... checking for APR... reconfig configuring package in srclib/apr now checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu Configuring APR library Platform: i686-pc-linux-gnu checking for working mkdir -p... yes APR Version: 1.4.5 checking for chosen layout... apr checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/httpd-2.2.22/srclib/apr': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. configure failed for srclib/apr [root@web01 httpd-2.2.22]# make make: *** ターゲットが指定されておらず, makefile も見つかりません. 中止. あともう1点教えていただきたいです。 アップグレードが途中で失敗している状態なのですが、configureまでであれば、既存のApacheには 影響していないでしょうか?

  • PHP5インストール時にlibphp5.soが作成されない

    こんにちは。 CentOS3、Apache/2.0.46 の環境で、PHP5をインストールしようとしています。 VPSでレンタルしたもので、すでにPHP4が入っていたものを、PHP4.4.4にバージョンアップし使っていましたが、5を使いたいと思いインストールを試みたのですが、configure、makeが終わり、make installの段階で以下のようなエラーがでて終了していまいます。 ーーーーーーーー Installing PHP SAPI module: apache2handler /usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/bin/libtool' libphp5.la /usr/lib/httpd/modules /usr/bin/libtool --mode=install cp libphp5.la /usr/lib/httpd/modules/ cp .libs/libphp5.lai /usr/lib/httpd/modules/libphp5.la cp .libs/libphp5.a /usr/lib/httpd/modules/libphp5.a ranlib /usr/lib/httpd/modules/libphp5.a chmod 644 /usr/lib/httpd/modules/libphp5.a libtool: install: warning: remember to run `libtool --finish /etc/php-5/libs' Warning! dlname not found in /usr/lib/httpd/modules/libphp5.la. Assuming installing a .so rather than a libtool archive. chmod 755 /usr/lib/httpd/modules/libphp5.so chmod: failed to get attributes of `/usr/lib/httpd/modules/libphp5.so': No such file or directory apxs:Error: Command failed with rc=65536 . make: *** [install-sapi] Error 1 ---------------------------- configureは --with-apxs2=/usr/sbin/apxsのオプションだけで行い、とりあえずlibphp5.soファイルを作ろうとしているのですが、作成されません。 ネットをしらべたところ大抵のサイトでは--with-apxs2=/usr/sbin/apxsをだけつけてconfigureすれば生成される、と書かれていたのですが。。。。 よろしくお願いいたします、

  • 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
  • PHPのインストールエラー

    Solaris8のマシンにphp-4.3.2をインストールしようとしたところ、コンパイル時に下記のようなエラーがでます。 checking for Apache 1.x module support via DSO through APXS... Sorry, I was not able to successfully run APXS. Possible reasons: 1. Perl is not installed; 2. Apache was not compiled with DSO support (--enable-module=so); 3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs The output of /opt/www/apache/bin/apxs follows Usage: apxs -g [-S <var>=<val>] -n <modname> apxs -q [-S <var>=<val>] <query> ... apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]] [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>] [-Wl,<flags>] <files> ... apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ... apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ... configure: error: Aborting 多分Apacheをインストールした際にDSO としてコンパイルしなかったためだと思うのですが、解決させるためには 改めてApacheをコンパイルしなけければならないのでしょうか?また、現在このマシン上では様々なWebを公開しているので、この環境のまま再度Apacheを入れなおすことは可能でしょうか?以上、よろしくお願い致します。

  • ApacheとTomcat5.0の連携でのエラー

    ApacheとTomcat5.0を連携させる段階で、自分ではどうにもできないエラーが出てきたので、対応策があるかどうかを教えて頂けると助かります。 環境ですが、 OS:Fedora Core 5 apache_1.3.29 tomcat-5.0.30 になります。エラーが起きるのは、jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gzを展開させて、 [root src]# tar zxvf jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz [root src]# cd jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/ [root native2]# ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr --with-apr-util の段階で出ます。内容ですが、エラー箇所の前後を載せておきます。 checking for mkdir... /bin/mkdir need to check for Perl first, apxs depends on it... checking for perl... /usr/bin/perl building connector for "apache-1.3" no apxs2 given checking checking for apache13...... not provided checking checking for apache20...... not provided checking checking for iis...... not provided checking checking for iPlanet...... not provided checking for tomcat33 location... not provided checking for tomcat40 location... not provided checking for tomcat41 location... not provided configure: error: valid apr source dir location required [root@master native2]# apache2とtomcat5.0の組み合わせでないと連携が難しいのか、単に環境的に不足しているものがあるのかだと思いますが、経験者の方でアドバイスを頂けると助かります。よろしくお願いします。

  • PHPのインストールがうまくできない。

    環境Fedora2 [root@localhost php-5.2.1]# ./configure --with-pgsql --with-apxs2=/usr/local/apache/bin/apxs --enable-mbstring --enable-mbregex ~省略~ checking if compiler supports -Wl,-rpath,... yes checking for re2c... re2c checking for re2c version... 0.11.0 (ok) checking for gawk... gawk checking for bison... no checking for byacc... no checking for bison version... invalid configure: warning: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 (found: none). checking for flex... lex checking for yywrap in -ll... no checking lex output file root... ./configure: line 3375: lex: command not found configure: error: cannot find output from lex; giving up warning だと、PHP parsersのためのバージョンが必要ということでしょうか?当然makeもできません。 [root@localhost php-5.2.1]# make make: *** ターゲットが指定されておらず、makefile も見つかりません。中止。 調べたんですが aptの導入が必要のようですがよくわからないので詳しい方おねがいします。

このQ&Aのポイント
  • 4年付き合った相手が、再度目標に専念したくなった。ショックで暴言を吐き好きかどうか分からなくなり喧嘩するたび辛い気持ちが続く
  • 関係を進めたいと思うが、辛い気持ちを抱えている相手との別れを検討中
  • 喧嘩後の相手の感情は一時的か、永遠に続くか不安
回答を見る