产品服务AMH 免费服务器主机面板SSL证书 免费SSL证书申请 担保单 免费安全、零费率交易平台编程助手免费智能写代码、翻译AMYSQL 免费MySQL管理工具

AMH 社区首页

 AMH社区 - 开放自由有价值的社区

[求助帖] [开发日志] centos5.*修复libxml2与重装/安装yum

amysql
创始人
16530.81 价值分

amysql 发表于 2013-07-04 14:39:24
[开发日志] centos5.*修复libxml2与重装/安装yum

在libxml2出错的情况下,PHP-FPM启动会报错,
# amh php restart
/usr/local/php/sbin/php-fpm: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

尝试yum安装libxml2报错:
# yum install libxml2
-bash: /usr/bin/yum: No such file or directory

yum都没有了,libxml2是与yum存在依赖关系。
下面先修复yum吧。yum是基于python,那先卸载当前python,

[root@amysql tmp]# rpm -qa | grep python
python-2.4.3-56.el5
...

rpm -e python-2.4.3 --nodeps --force;
不过看到版本也相同。
卸载完成后,shell脚本rpm包安装yum。

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
url='http://mirror.centos.org/centos-5/5/os/i386/CentOS/';
for package in python-2.4.3-56.el5.i386.rpm python-devel-2.4.3-56.el5.i386.rpm python-elementtree-1.2.6-5.i386.rpm python-iniparse-0.2.3-6.el5.noarch.rpm python-setuptools-0.6c5-2.el5.noarch.rpm python-sqlite-1.1.7-1.2.1.i386.rpm python-urlgrabber-3.1.0-6.el5.noarch.rpm rpm-python-4.4.2.3-31.el5.i386.rpm yum-3.2.22-40.el5.centos.noarch.rpm yum-metadata-parser-1.1.2-4.el5.i386.rpm ; do
rpm -Uvh $url$package --nodeps --force;
done;

再次yum,
[root@amysql tmp]# yum
提示没找到libxml2,
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
libxml2.so.2: cannot open shared object file: No such file or directory

安装libxml2,
# rpm -Uvh http://mirror.centos.org/centos-5/5/os/i386/CentOS/libxml2-2.6.26-2.1.15.el5_8.6.i386.rpm --nodeps --force

最后,yum更新libxml2
#yum install libxml2
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libxml2.i386 0:2.6.26-2.1.21.el5_9.2 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================
Package Arch Version
======================================================================
Updating:
libxml2 i386 2.6.26-2.1.21.el5_9.2

Transaction Summary
======================================================================
Install 0 Package(s)
Upgrade 1 Package(s)

Total size: 798 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libxml2 1/2
Cleanup : libxml2 2/2

Updated:
libxml2.i386 0:2.6.26-2.1.21.el5_9.2

Complete!
======================================================================


libxml2、yum修复完成。
/etc/init.d/amh-start 重启面板。

2013-07-04 14:39:24 1

AMH面板 - 好用高效低占用、安全可靠极稳定

沧桑
银牌会员
1030.15 价值分

:time:表示没看懂
  支持 (0分)  反对 (0分)
回复  2013-07-05 16:39:33 2

ylx
银牌会员
4334.00 价值分

debian 不影响~


  支持 (0分)  反对 (0分)
回复  2013-07-05 20:12:12 3

nginx
银牌会员
1752.00 价值分

引用:
ylx 发表于 2013-7-5 20:12
debian 不影响~


:time: centos
  支持 (0分)  反对 (0分)
回复  2013-07-08 05:44:36 4
 1  (总1页)
AMH社区列表
用户服务中心