找不到PHP Shell命令错误GLIBCXX_3.4.9 [英] php shell command error GLIBCXX_3.4.9 not found

查看:99
本文介绍了找不到PHP Shell命令错误GLIBCXX_3.4.9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从php执行shell命令以将文件转换为pdf,但出现此错误.
有人可以详细解释如何解决吗?
我在linux中不太好(
而且如果我直接通过终端执行命令,一切都会正常.

Im trying to execute shell command from php to convert files to pdf but i get this error.
Could someone explain me in details how to fix it?
Im not so good in linux(
and also if i execute command straight through terminal everything works.

    /usr/lib/libreoffice/program/oosplash: /opt/lampp/lib/libstdc++.so.6:
    version `GLIBCXX_3.4.9' not found 
    (required by /usr/lib/libreoffice/program/../ure-link/lib/libuno_sal.so.3)

推荐答案

找不到版本"GLIBCXX_3.4.9"

version `GLIBCXX_3.4.9' not found

问题在于,在这种环境下,您使用的/opt/lampp/lib/libstdc++.so.6太旧了,并且没有定义"GLIBCXX_3.4.9"版本.

The problem is that in this environment, you are using /opt/lampp/lib/libstdc++.so.6 which is too old, and does not define the `GLIBCXX_3.4.9' version.

如果我直接通过终端执行命令,一切正常.

if i execute command straight through terminal everything works.

在这种情况下,您可能会使用/usr/lib/libstdc++.so.6,(显然)这已经足够新了.

In that case, you are likely using /usr/lib/libstdc++.so.6, which is (apparently) new enough.

可能的解决方案:

  1. 删除/opt/lampp/lib/libstdc++.so.6并在任何地方使用/usr/lib/libstdc++.so.6(libstdc ++.so.6应该是向后兼容的,因此从理论上讲,没有理由使用较旧的版本).
  2. 在调用oosplash之前在PHP中未设置LD_LIBRARY_PATH,因此它使用更新的库.
  1. Remove /opt/lampp/lib/libstdc++.so.6 and use /usr/lib/libstdc++.so.6 everywhere (libstdc++.so.6 is supposed to be backwards-compatible, so in theory there should be no reason to use older version).
  2. Un-set LD_LIBRARY_PATH in PHP before invoking oosplash, so it uses the newer library.

这篇关于找不到PHP Shell命令错误GLIBCXX_3.4.9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆