报错形式
penge@Kylin:~/桌面/doc/kylin/dist/xf$ ./xf
Traceback (most recent call last):
File "xf.py", line 3, in <module>
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /home/penge/桌面/doc/kylin/dist/xf/libexpat.so.1)
uname -a
查看系统版本
penge@Kylin:~/桌面/doc/kylin/dist/xf$ uname -a
Linux Kylin 4.4.131-20200901.kylin.x86-generic #kylin SMP Wed Sep 2 08:59:33 CST 2020 x86_64 x86_64 x86_64 GNU/Linux
分析原因
glibc
是linux
底层的API
库。通常情况下,有些环境需要glibc更高的版本才支持,比如GLIBC_2.28。
另外对它操作升级,可能有导致系统崩溃的风险。
解决方案
软件包升级GLIBC_2.25
使用命令查看服务器当前版本
strings /lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC_
penge@Kylin:~/桌面/doc/kylin/dist/xf$ strings /lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC_
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_2.18
GLIBC_2.22
GLIBC_2.23
GLIBC_PRIVATE
发现没有GLIBC_2.25
添加软件源,/etc/apt/sources.list文件的下面添加一行:
deb http://security.debian.org/debian-security buster/updates main
deb http://mirrors.ustc.edu.cn/debian-security/ buster/updates main
然后更新一波
sudo apt update
出现bug
penge@Kylin:~/桌面/doc/kylin/dist/xf$ sudo vim /etc/apt/sources.list
penge@Kylin:~/桌面/doc/kylin/dist/xf$ sudo apt update
命中:1 http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp4 InRelease
获取:2 http://security.debian.org/debian-security buster/updates InRelease [34.8 kB]
错误:2 http://security.debian.org/debian-security buster/updates InRelease
由于没有公钥,无法验证下列签名: NO_PUBKEY 112695A0E562B32A NO_PUBKEY 54404762BBB6E853
正在读取软件包列表... 完成
W: GPG 错误:http://security.debian.org/debian-security buster/updates InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 112695A0E562B32A NO_PUBKEY 54404762BBB6E853
E: 仓库 “http://security.debian.org/debian-security buster/updates InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
根据错误输入以下命令
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 112695A0E562B32A 54404762BBB6E853
penge@Kylin:~/桌面/doc/kylin/dist/xf$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 112695A0E562B32A 54404762BBB6E853
Executing: /tmp/tmp.PteElJ5gAl/gpg.1.sh --keyserver
keyserver.ubuntu.com
--recv-keys
112695A0E562B32A
54404762BBB6E853
gpg: 下载密钥‘E562B32A’,从 hkp 服务器 keyserver.ubuntu.com
gpg: 下载密钥‘BBB6E853’,从 hkp 服务器 keyserver.ubuntu.com
gpg: 密钥 CAA96DFA:公钥“Debian Security Archive Automatic Signing Key (10/buster) <[email protected]>”已导入
gpg: 密钥 4AAD5C5D:公钥“Debian Security Archive Automatic Signing Key (11/bullseye) <[email protected]>”已导入
gpg: 合计被处理的数量:2
gpg: 已导入:2 (RSA: 2
再次跟新
sudo apt-get update
penge@Kylin:~/桌面/doc/kylin/dist/xf$ sudo apt-get update
正在读取软件包列表... 完成
E: 无法获得锁 /var/lib/apt/lists/lock - open (11: 资源暂时不可用)
E: 无法对目录 /var/lib/apt/lists/ 加锁
penge@Kylin:~/桌面/doc/kylin/dist/xf$ sudo rm /var/lib/apt/lists/lock
查看软件包可更新列表
sudo apt list --upgradable
sudo apt install libc6-dev /sudo apt install libc6
strings /lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC_
penge@Kylin:~/桌面/doc/kylin/dist/xf$ strings /lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC_
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_2.18
GLIBC_2.22
GLIBC_2.23
GLIBC_2.24
GLIBC_2.25
GLIBC_2.26
GLIBC_2.27
GLIBC_2.28
GLIBC_PRIVATE
penge@Kylin:~/
参考资料