PECL安装失败

Jam*_*mes 8 c pear centos pecl

我浏览过每一个Google搜索结果,阅读有关此错误的所有论坛帖子,但我无法解决.

当使用PECL安装时,我总是得到这个错误:

checking whether the C compiler works... configure: error: cannot run C compiled programs.
Run Code Online (Sandbox Code Playgroud)

其他一切都成功到了那一点他们bam!

我使用的是CentOS 4.3,PEAR是最新的稳定版本,GCC是一个稳定的最新版本.一切都按预期工作,但C编译器似乎总是出错.我试图通过暂时启用它来使tmp具有正确的操作特权:

mount -o remount,exec,suid /tmp
Run Code Online (Sandbox Code Playgroud)

但这不起作用.

我确实尝试过所有建议都无济于事.有任何想法吗?

Ste*_*ven 9

我在Centos 5.3上,通过删除/ tmp /var/tmp 上的noexec标志,我能够成功运行PECL安装程序(在我的情况下是APC)

mount -o remount,exec,suid /tmp
mount -o remount,exec,suid /var/tmp
Run Code Online (Sandbox Code Playgroud)

仅在/ tmp上执行此操作不起作用 - 我仍然收到错误"检查C编译器是否正常工作... configure:错误:无法运行C编译的程序."

在安装完成后,请记住使用noexec再次运行这些重新安装.


Jam*_*mes 7

cd ~
mkdir setups
cd setups
wget http://pecl.php.net/get/APC-3.1.2.tgz
tar -xvf APC-3.1.2.tgz
cd APC-3.1.2
phpize && ./configure --with-apxs && make
Run Code Online (Sandbox Code Playgroud)

我很快写完了,并且能够通过一些手动工作来安装APC.比如将模块复制到PHP模块并将扩展名添加到php.ini中.现在工作得很好.