最近在安装mysql的rpm包时,出现了一个问题,
当使用命令:rpm -i Mysql-server-xxxx.rpm时出现以下错误:
error:Failed dependencies:
ld-linux.so.2 is needed by MySql-server-xxx
libc.so.6 is needed by MySql-server-xxx
libc.so.6(GLIBC_2.0) is needed by MySql-server-xxx
...............................................................................................
如上,很明显缺少相关的依赖包,于是使用yum命令安装相关的依赖
使用命令:yum install ld-linux.so.2
又出错了,错误如下:
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base
解决方法如下(修改dns配置)
vi /etc/resolv.conf
在此文件最后加入:nameserver 8.8.8.8
如果没有vi编辑器可用:
echo "nameserver 8.8.8.8" >>/etc/resolv.conf
然后ping www.baidu.com
可以ping通,不会再出现unknow host
ok,安装依赖,
yum install ld-linux.so.2
最后出现compelete即可
————————————————
版权声明:本文为CSDN博主「Garry1115」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zwx19921215/article/details/41823753