首页 > 技术文章 > Linux报错集锦

smlile-you-me 2021-11-16 11:31 原文

今天在对glibc降级时出现了问题,降级过程是先删除原来的glibc,在安装新(比原来的版本低)的glibc,但删除glibc后出大问题了....如下图
/lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

原因是ld-linux-x86-64.so.2是操作系统的核心,并不受LD_LIBRARY_PATH环境变量的影响。如果想改变其调用方式需查看man文档。可能是这个文档太老了,在服务器上怎么man都没有,只有网上有:http://www.man7.org/linux/man-pages/man8/ld.so.8.html

解决如下:

使用linux救援模式进入系统。原系统被挂载到 /mnt/sysimage/目录下,拷贝需要文件到挂载的对应目录里面,然后重启系统恢复正常。
拷贝需要文件:
cp -rf /lib64/*   /mnt/sysimage/lib64/
reboot  或者  exit

MySQL5.7 报错 Lost connection to MySQL server during query

root@db-01:~# vim /etc/my.cnf
#该值设置过小将导致单个记录超过限制后写入数据库失败,且后续记录写入也将失败
#max_allowed_packet = 128M        # 原来的值
max_allowed_packet = 1024M        # 调整后的值


# 重启MySQL
root@db-01:~# /etc/init.d/mysql restart
Restarting mysql (via systemctl): mysql.service

ssh时报 Unable to negotiate with 172.xx.xx.62 port 22: no matching cipher found. Their offer: 3des-cbc

出现这样的错误并不是账号、密码、地址错误,纯粹时用了ssh的加密算法而已
解决:
先登录到该机器:ssh -c 3des-cbc@172.xx.xx.62
然后讲ssh的加密算法注释
vim /etc/ssh/sshd_config
#Ciphers 3des-cbc
#MACs hmac-sha1,hmac-md5

重启ssh让其生效
systemctl restart sshd

message中报 mariadb-5.5.52-1.el7.x86_64 has missing requires of mariadb-libs(x86-64)

CentOS7.6

解决:
wget  http://mirror.centos.org/centos/7/os/x86_64/Packages/mariadb-libs-5.5.68-1.el7.x86_64.rpm
yum -y install mariadb-libs-5.5.68-1.el7.x86_64.rpm
ldconfig -v|grep libmysqlclient.so

欢迎加入QQ群一起讨论Linux、开源等技术

推荐阅读