错误现象
CentOS6.8安装 WDCP v3.0 后发现前台无法打开,后台 phpmyadmin 也无法访问。
检查后发现前台 Apache 启动失败。
手动重启 Apache 服务service httpd restart
提示:
Starting httpd: httpd: Syntax error on line 54 of /www/wdlinux/httpd-2.2.22/conf/httpd.conf: Cannot load /www/wdlinux/httpd-2.2.22/modules/libphp5.so into server: libmhash.so.2: cannot open shared object file: No such file or directory
[FAILED]
检查原因
估计是安装时某个依赖项没有安装成功,检查安装日志发现如下错误:
—2017-02-13 18:30:53— http://dl.wdlinux.cn/rpms/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Resolving dl.wdlinux.cn… 222.186.61.177
Connecting to dl.wdlinux.cn|222.186.61.177|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 12700 (12K) [text/plain]
Saving to: ?rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm?
100%[================================================================================>] 12,700 —.-K/s in 0.06s
2017-02-13 18:30:53 (204 KB/s) - ?rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm? saved [12700/12700]warning: rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
Preparing… ########################################### [100%]
1:rpmforge-release ########################################### [100%]
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://apt.sw.be/redhat/el6/en/mirrors-rpmforge error was
14: PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found”
base: mirrors.tuna.tsinghua.edu.cn
extras: mirrors.aliyun.com
updates: mirrors.aliyun.com
http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found”
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn’t help to resolve this issue please open a ticket with Red Hat Support.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmforge. Please verify its path and try again
手动更新yum update
也出现如下错误:
[root@cloud ~]# yum update
Loaded plugins: fastestmirror
Setting up Update Process
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://apt.sw.be/redhat/el6/en/mirrors-rpmforge error was
14: PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found”
base: mirrors.tuna.tsinghua.edu.cn
extras: mirrors.aliyun.com
updates: mirrors.aliyun.com
http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found”
Trying other mirror.
To address this issue please refer to the below knowledge base articlehttps://access.redhat.com/articles/1320623
If above article doesn’t help to resolve this issue please open a ticket with Red Hat Support.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmforge. Please verify its path and try again
内容都是http://apt.sw.be/redhat/el6/en/mirrors-rpmforge
访问失败。
解决方案
Google后发现改地址已转移至http://mirrorlist.repoforge.org/el6/mirrors-rpmforge
[1]
需要修改系统 yum 设置。
进入/etc/yum.repos.d/
目录
修改rpmforge.repo
文件
文件原内容大概如下:
文件中有三处需要修改:
①
修改为
②
修改为
③
修改为
修改完成后按 Esc 然后保存退出:wq
。
再次yum update
即可成功。
由于之前 WDCP 安装过程中出错,所以有些组件没有安装成功,根据错误提示找到安装脚本中的相关内容如下:
出错导致mhash-devel
与libmcrypt-devel
没有安装,手动安装即可:
安装成功后手动启动前台 Apache 服务:
启动成功,前台与 phpmyadmin 都能正常打开了。