【原创】解决PHP报错: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file:...
问题背景:
64位的CenOS系统安装了XAMPP集成包,但是XAMPP包则是32位的,执行 /opt/lampp/bin/php -v,结果报错:
error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
问题原因:
缺少32位的libgcc_s.so.1库,用 locate libgcc_s.so.1 定位发现只有 /lib64/libgcc_s.so.1,即只有64位的库,缺少32位的库。
解决方案:
首先定位下libgcc_s.so.1库属于哪个安装包,然后安装:
yum provides libgcc_s.so.1 yum install libgcc-4.4.7-18.el6_9.2.i686
继续报错:
执行完上述步骤后,继续报错:
Protected multilib versions: libgcc-4.4.7-18.el6_9.2.i686 != libgcc-4.4.7-4.el6.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
问题原因:
32位和64位的libgcc库版本不一致,必须保持一致.
解决方案:
yum update libgcc-4.4.7-4.el6.x86_64
版权声明:除非注明,本文由( blogdaren )原创,转载请保留文章出处。
本文链接:【原创】解决PHP报错: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file:...
发表评论: