PECL 安装失败
我浏览了所有谷歌结果,阅读了所有有关此错误的论坛帖子,但我无法解决它。
当使用 PECL 安装进行任何操作时,我总是会收到此错误:
checking whether the C compiler works... configure: error: cannot run C compiled programs.
到目前为止,其他一切都成功了!
我使用的是CentOS 4.3,PEAR是最新的稳定版本,GCC是最新的稳定版本。 一切都按预期工作,但 C 编译器似乎总是出错。 我尝试通过暂时启用 tmp 来使 tmp 具有操作的正确权限:
mount -o remount,exec,suid /tmp
但这不起作用。
我确实尝试了所建议的所有内容,但均无济于事。 有任何想法吗?
I have browsed every Google result, read all the forum posts about this error, but I cannot solve it.
When using PECL install for anything, I always end up getting this error:
checking whether the C compiler works... configure: error: cannot run C compiled programs.
Everything else succeeds up to that point them bam!
I'm using CentOS 4.3, PEAR is the latest stable version, GCC is a stable and recent version. Everything is working as it should, but the C compiler always seems to error. I've tried to make tmp have the right privilages for the operation by temporarily enabling it using:
mount -o remount,exec,suid /tmp
But that doesn't work.
I've literally tried everything that has been suggested by to no avail. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我使用的是 Centos 5.3,通过删除 /tmp 和 /var/tmp 上的 noexec 标志,我能够成功运行 PECL 安装程序(在我的例子中是 APC),
仅在 /tmp 上执行此操作没有不起作用 - 我仍然收到错误“正在检查 C 编译器是否工作...配置:错误:无法运行 C 编译的程序。”
请记住在安装完成后使用 noexec 再次运行这些重新安装。
I'm on Centos 5.3 and I was able to get PECL installers running (APC in my case) successfully by removing the noexec flag on both /tmp and /var/tmp
Doing this only on /tmp didn't work - I still received the error "checking whether the C compiler works... configure: error: cannot run C compiled programs."
Remember to run these remounts again with noexec after your install finishes.
我很快就把它写下来,并且能够通过一些手动工作来安装 APC。 例如将模块复制到PHP模块并将扩展添加到php.ini。 现在工作完美。
I quickly wrote that up and was able to install APC with a bit of manual work. Such as copying the module to PHP modules and adding the extension to the php.ini. Works perfectly now.
当我安装 MongoDB 驱动程序时遇到类似问题时,这对我有用:
然后:(
这不会打开安全漏洞,因为只有 root 可以在这两个目录中创建可执行文件。)
请注意,以下内容不会 为 PECL 工作:
When I had similar problems installing the MongoDB driver, this worked for me:
Then:
(This doesn't open a security hole because only root can create executables in those two directories.)
Note that the following does not work for PECL: