安装apache时提示error: cannot run C compiled programs.

mouzhi
安装apache时提示error: cannot run C compiled programs.

安装apache时,有两个错误提示,如下:
1. error while loading shared libraries: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory
2.error: cannot run C compiled programs.

各位高手有碰到这种情况的吗?该如何解决?


----------------------------------------------------------------------------------

configure:4352: checking whether the C compiler works
configure:4362: ./a.out
./a.out: error while loading shared libraries: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory
configure:4365: $? = 127
configure:4374: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

cuci
1. libmysqlclient_r.so.15安装相关包,或者找一个cp过去
2.setenv C gcc试试

lunchan
安装libmysqlclient_r.so

jinl
同意2楼的意见,另外可能还缺少c编译器

jerrywjl
把系统中带mysql的所有包都装上吧。毕竟也不算多。

mouzhi
看到有的资料说,需要关掉防火墙selinux可以解决连接mysql的问题。
我已经安装了GCC了,error: cannot run C compiled programs.的问题不知道如何解决?

jerrywjl
把你的系统版本以及配置过程贴上来看看。

mouzhi
怎么在centos下不能用setenv呢?提示没有这个命令。

而且libmysqlclient_r.so.15和libmysqlclient_r.so在/usr/local/mysql/lib/下是存在的。

mysql我是通过这样安装的。

把mysql文件复制到/usr/local/mysql下。

groupadd mysql
useradd -g mysql mysql
./scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
cp support-files/my-large.cnf /etc/my.cnf
mysqld_safe --user=mysql &


是centos5.0。

#安装apache时碰到的如上问题。
./configure --prefix=/usr/local/apache2 --enable-so --with-mpm=worker --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/apache2/conf --enable-module=rewrite --enable-deflate=deflate --enable-cache --enable-mem-cache --enable-disk-cache --enable-rewrite=shared --enable-deflate=shared --enable-status=shared

[[i] 本帖最后由 mouzhi 于 2008-6-21 12:33 编辑 [/i]]

mouzhi
问题已经解决。
方法是:
cp /usr/local/mysql/lib/mysql/libmysqlclient_r.so.15 /usr/lib/.