安装PHP出现如下问题,在LINUX下面,请教高手,如何解决,

huayuxing 2004-04-09 09:39:21
[root@localhost php]# ./configure --prefix=/usr/local/php --with-apxs=/usr/sbin/apxs --with-mysql=/usr/local/mysqql --enable-fore-cgi-redirect --with-config-file-path=/usr/local/php
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... exit 0;
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for mawk... no
checking for gawk... gawk
checking for bison... bison -y
checking bison version... 1.35 (ok)
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for working const... yes
checking flex version... 2.5.4 (ok)
checking for pthreads_cflags... -pthread
checking for pthreads_lib...

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... configure: error: You have enabled Apache 1.3 support while your server is Apache 2. Please use
the appropiate switch --with-apxs2
[root@localhost php]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/local/mysqql --enable-fore-cgi-redirect --with-config-file-path=/usr/local/php
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... exit 0;
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for mawk... no
checking for gawk... gawk
checking for bison... bison -y
checking bison version... 1.35 (ok)
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for working const... yes
checking flex version... 2.5.4 (ok)
checking for pthreads_cflags... -pthread
checking for pthreads_lib...

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 member fd in BUFF *... 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... apxs:Error: Invalid query string `APU_BINDIR'.
apxs:Error: Invalid query string `APR_BINDIR'.
./configure: line 1: /apu-config: No such file or directory
./configure: line 1: /apr-config: No such file or directory
configure: error: Please note that Apache version >= 2.0.44 is required.
[root@localhost php]# make
make: *** No targets specified and no makefile found. Stop.
[root@localhost php]#
...全文
409 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
huayuxing 2004-04-21
  • 打赏
  • 举报
回复
我用的就是9 REDHAT 完全安装啊,
sleetdrop 2004-04-21
  • 打赏
  • 举报
回复
用rpm省心,自己编译干净高效,但比较难。
用freebsd时才感到二者可以某总程度的兼得。
jaexc 2004-04-21
  • 打赏
  • 举报
回复
--with-apxs2=/usr/sbin/apxs
早用过了,也是有问题,MAKE不了,
有LINUX PHP MYSQL组合在一起的光盘卖吗

:不好意思 打错路径拉

--with-apxs2 是 apxs(Apache Extension Tool)需要根据Apache的安装路径来修改
一般在你apache2当前目录下bin/apxs (/user/bin/apxs也有个)

你可以用:locate apxs 查找

你linux上的那Apache 是怎么安装呢?
xqzzqx 2004-04-10
  • 打赏
  • 举报
回复
LINUX PHP MYSQL组合在一起的光盘到是没有见过,不过PHP+APACHE+MYSQL整合到一
起去的软件倒是见过,用nusphere这类软件,全都在一起,用的时候只要安装就行
减少配置,真的非常方便(对新手来说)。
feixuehenshui 2004-04-09
  • 打赏
  • 举报
回复
增加MYSQL 群组用户
skystar008 2004-04-09
  • 打赏
  • 举报
回复
强正在学LINUX
xumail 2004-04-09
  • 打赏
  • 举报
回复
还要看你的apache安装的时候有没有使用这个模式
mistjin 2004-04-09
  • 打赏
  • 举报
回复
不知道楼主Apache是2版还是1版,如果是2版
--with-apxs=/usr/sbin/apxs
好像是 --with-apxs2=/usr/sbin/apxs
52juanjuan 2004-04-09
  • 打赏
  • 举报
回复
up
unixdotnet 2004-04-09
  • 打赏
  • 举报
回复
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> scripts/mysql_install_db
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/var
shell> chgrp -R mysql /usr/local/mysql
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> /usr/local/mysql/bin/safe_mysqld --user=mysql &
or
shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &
启动mysql服务

shell> groupadd nobody
shell> useradd -g nobody nobody
shell> gzip -d httpd-2_0_NN.tar.gz
shell> tar xvf httpd-2_0_NN.tar
shell> gunzip php-NN.tar.gz
shell> tar -xvf php-NN.tar
shell> cd httpd-2_0_NN
shell> ./configure --enable-so
shell> make


shell> cd ../php4-NN
shell> ./configure --with-mysql --with-apxs2=/usr/local/apache2/bin/apxs
shell> make
shell> make install
shell> cp php.ini-dist /usr/local/lib/php.ini
编辑php.ini适合您的使用,可以在php的configure配置命令中加上--with-config-file-path=/path参数指定php.ini存放的位置.

shell> 编辑httpd.conf
如果里面没有,加入:
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php

shell> /usr/local/apache2/bin/apachectl start
启动apachectl服务.
anybody999 2004-04-09
  • 打赏
  • 举报
回复
apxs=/usr/sbin/apxs --with-mysql=/usr/local/mysqql
apxs:Error: Invalid query string `APU_BINDIR'.

apxs失效
phanx 2004-04-09
  • 打赏
  • 举报
回复
为什么要用apache2 呢,其实apache1.3 也很不错的
xylegend 2004-04-09
  • 打赏
  • 举报
回复
像我那样使用MDK9.1 Linux完全安装什么事也没有
如果自己编译后再安装一般也不会有问题的,rpm包往往还可能有版本冲突
waterpub 2004-04-09
  • 打赏
  • 举报
回复
--with-apxs2=/usr/sbin/apxs2
再试一下看看
anybody999 2004-04-09
  • 打赏
  • 举报
回复
用linux不能怕麻烦的
mistjin 2004-04-09
  • 打赏
  • 举报
回复
找redhat 9吧,只要全部安装就好了
当然自己也可以选择
unixdotnet 2004-04-09
  • 打赏
  • 举报
回复
huayuxing(huayuxing):你究竟有没有按照我的过程去安装?是有问题就贴出来,没问题就给分。你想用linux又怕麻烦可以用debian。
huayuxing 2004-04-09
  • 打赏
  • 举报
回复
--with-apxs2=/usr/sbin/apxs
早用过了,也是有问题,MAKE不了,
有LINUX PHP MYSQL组合在一起的光盘卖吗
jaexc 2004-04-09
  • 打赏
  • 举报
回复
Apache2.0.XX
--with-apxs2=/usr/sbin/apxs

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧