免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2822 | 回复: 6
打印 上一主题 下一主题

RedHat9用源码安装PHP-5.1.2出问题啦~!!!!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-02-25 15:27 |只看该作者 |倒序浏览
在网上看了N篇帖子,都没能解决问题。特来向各位大侠请教一二!!!
环境:RedHat9+Apache2+zlib+jpeg6+libpng+gd+mysql5+php5
现在就差PHP5装不上了。搞了三、四天时间了,都还没搞定~~~




[root@server7 php-5.1.2]#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/www/bin/apxs --with-jpeg-dir=/usr/local/jpeg6c --with-png-dir=/usr/local/libpng --with-gd --enable-trace-vars --with-zlib-dir=/usr/local/zlib -with-mysql=/usr/local/mysql --enable-so
.
.
.
.
[root@server7 php-5.1.2]#make
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

[root@server7 php-5.1.2]# make install
Installing PHP SAPI module:       apache2handler
/usr/local/www/build/instdso.sh SH_LIBTOOL='/usr/local/www/build/libtool' libphp5.la /usr/local/www/modules
/usr/local/www/build/libtool --mode=install cp libphp5.la /usr/local/www/modules/
cp .libs/libphp5.lai /usr/local/www/modules/libphp5.la
cp .libs/libphp5.a /usr/local/www/modules/libphp5.a
ranlib /usr/local/www/modules/libphp5.a
chmod 644 /usr/local/www/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /home/welldrong/php-5.1.2/libs'
Warning!  dlname not found in /usr/local/www/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/www/modules/libphp5.so
chmod: 无法取得 ‘/usr/local/www/modules/libphp5.so’ 的属性: 没有那个文件或目录
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1
[root@server7 php-5.1.2]# libtool --finish /home/welldrong/php-5.1.2/libs
PATH="$PATH:/sbin" ldconfig -n /home/welldrong/php-5.1.2/libs
----------------------------------------------------------------------
Libraries have been installed in:
   /home/welldrong/php-5.1.2/libs

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so( manual pages.
----------------------------------------------------------------------
[root@server7 php-5.1.2]# make install
Installing PHP SAPI module:       apache2handler
/usr/local/www/build/instdso.sh SH_LIBTOOL='/usr/local/www/build/libtool' libphp5.la /usr/local/www/modules
/usr/local/www/build/libtool --mode=install cp libphp5.la /usr/local/www/modules/
cp .libs/libphp5.lai /usr/local/www/modules/libphp5.la
cp .libs/libphp5.a /usr/local/www/modules/libphp5.a
ranlib /usr/local/www/modules/libphp5.a
chmod 644 /usr/local/www/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /home/welldrong/php-5.1.2/libs'
Warning!  dlname not found in /usr/local/www/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/www/modules/libphp5.so
chmod: 无法取得 ‘/usr/local/www/modules/libphp5.so’ 的属性: 没有那个文件或目录
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1
[root@server7 php-5.1.2]#

老是说Warning!  dlname not found in /usr/local/www/modules/libphp5.la
但我看过这个目录下面明明有libphp5.la这个文件的,但确实没有/usr/local/www/modules/libphp5.so这个文件。
郁闷了,以前从来没有这个问题。现在就算我装回PHP4也不行了,又会提示没有libphp4.so -.-!!

论坛徽章:
0
2 [报告]
发表于 2006-02-25 22:35 |只看该作者
不懂,帮顶了

论坛徽章:
0
3 [报告]
发表于 2006-02-26 07:32 |只看该作者
安装以前好好看看PHP5的安装文档

论坛徽章:
0
4 [报告]
发表于 2006-02-26 11:09 |只看该作者
晕!!我看过PHP5的安装文档了,里面介绍安装方法简单得不能再简单了:

1.  gzip -d httpd-2_0_NN.tar.gz
2.  tar xvf httpd-2_0_NN.tar
3.  gunzip php-NN.tar.gz
4.  tar -xvf php-NN.tar
5.  cd httpd-2_0_NN
6.  ./configure --enable-so
7.  make
8.  make install
9.  cd ../php-NN
10. ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
11. make
12. make install
13. Setup your php.ini

    cp php.ini-dist /usr/local/lib/php.ini

    You may edit your .ini file to set PHP options.  If you prefer having
    php.ini in another location, use --with-config-file-path=/some/path in
    step 10.

    If you instead choose php.ini-recommended, be certain to read the list
    of changes within, as they affect how PHP behaves.

14. Edit your httpd.conf to load the PHP module.  The path on the right hand
    side of the LoadModule statement must point to the path of the PHP
    module on your system.  The make install from above may have already
    added this for you, but be sure to check.

    For PHP 4:

      LoadModule php4_module modules/libphp4.so  

    For PHP 5:

      LoadModule php5_module modules/libphp5.so  <--问题是APACHE安装目录下的MODULES目录下根本没有这个文件

15. Tell Apache to parse certain extensions as PHP.  For example,
    let's have Apache parse the .php extension as PHP.  You could
    have any extension(s) parse as PHP by simply adding more, with
    each separated by a space.  We'll add .phtml to demonstrate.

      AddType application/x-httpd-php .php .phtml      这个已经加了

    It's also common to setup the .phps extension to show highlighted PHP
    source, this can be done with:

      AddType application/x-httpd-php-source .phps  这个也加了

16. Use your normal procedure for starting the Apache server, e.g.:

      /usr/local/apache2/bin/apachectl start    重启就会报找不到libphp5.so这个文件

   Following the steps above you will have a running Apache 2.0 with
   support for PHP as SAPI module. Of course there are many more
   configuration options available for both, Apache and PHP. For more
   information use ./configure --help in the corresponding source tree.
   In case you wish to build a multithreaded version of Apache 2.0 you
   must overwrite the standard MPM-Module prefork either with worker or
   perchild. To do so append to your configure line in step 6 above
   either the option --with-mpm=worker or --with-mpm=perchild. Take care
   about the consequences and understand what you are doing. For more
   information read the Apache documentation about the MPM-Modules.

     Note: If you want to use content negotiation, read the Apache
     MultiViews FAQ.

     Note: To build a multithreaded version of Apache your system must
     support threads. This also implies to build PHP with experimental
     Zend Thread Safety (ZTS). Therefore not all extensions might be
     available. The recommended setup is to build Apache with the
     standard prefork MPM-Module.
这个MPM是什么东西啊?以前都没接触过。

[ 本帖最后由 welldrong 于 2006-2-26 11:16 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2006-02-27 12:29 |只看该作者
建议不要先配置那么多的参数!!!!

先试一下直接./configure看看行不行,再慢慢添加其它的参数,这样就知道错误原因在哪儿啦

[ 本帖最后由 zhuaibing 于 2006-2-27 12:31 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2006-02-27 14:11 |只看该作者
问题已解决。竟然是下载的源码有问题!!

&%^*&#%*($E*)(*$%@$@^(*&)(*)*(_#@#@@^&(*&)(*)_……

论坛徽章:
0
7 [报告]
发表于 2006-02-27 19:05 |只看该作者
在网上看了N篇帖子,都没能解决问题。特来向各位大侠请教一二!!!
环境:RedHat9+Apache2+zlib+jpeg6+libpng+gd+mysql5+php5
现在就差PHP5装不上了。搞了三、四天时间了,都还没搞定~~~


R9的一些库文件的版本不支持php5
比如:libxml2的版本就需要是2.6.1以上的版本支持
      flex版本等
建议看一下php5的document

http://php.chinaunix.net/manual/ ... install.unix.apache

[ 本帖最后由 qmailer 于 2006-2-27 19:06 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP