I was stuck with similar problem since Nov 27, 2017 when I installed XZ Utils
5.2.3 from sources on CentOS 7.4 and copied liblzma.so.5.2.3
from /usr/local/lib/
to /lib64/
.
(自2017年11月27日以来,当我在CentOS 7.4上从源代码安装XZ Utils
5.2.3并将liblzma.so.5.2.3
从/usr/local/lib/
复制到/lib64/
时,我一直遇到类似的问题。)
Cause of this problem is library librpmio.so.3
which requires symbol XZ_5.1.2alpha
to be defined in lzma shared library.
(出现此问题的原因是库librpmio.so.3
,它要求在XZ_5.1.2alpha
共享库中定义符号XZ_5.1.2alpha
。)
liblzma.so.5.2.2
defines this symbol but liblzma.so.5.2.3
doesn't. (liblzma.so.5.2.2
定义了此符号,但liblzma.so.5.2.3
没有定义。)
Without XZ update the most recent version of lzma library was 5.2.2 and I had symbolic link /lib64/liblzma.so.5
-> /lib64/liblzma.so.5.2.2
.
(如果没有XZ更新,则lzma库的最新版本为5.2.2,我具有符号链接/lib64/liblzma.so.5
> /lib64/liblzma.so.5.2.2
。)
After copying liblzma.so.5.2.3
and some further updates the link was changed to the most recent file ie /lib64/liblzma.so.5
-> /lib64/liblzma.so.5.2.3
. (复制liblzma.so.5.2.3
并进行进一步更新后,链接更改为最新文件,即/lib64/liblzma.so.5
> /lib64/liblzma.so.5.2.3
。)
And that broke rpm
and yum
commands. (yum
破坏了rpm
和yum
命令。)
So, solution is: (因此,解决方案是:)
Link /lib64/liblzma.so.5
back to /lib64/liblzma.so.5.2.2
:
(链接/lib64/liblzma.so.5
回/lib64/liblzma.so.5.2.2
:)
cd /lib64 sudo ln -s -f liblzma.so.5.2.2 liblzma.so.5
Delete file /lib64/liblzma.so.5.2.3
(删除文件/lib64/liblzma.so.5.2.3
)
Second possible cause might be environment variable LD_LIBRARY_PATH
.
(第二个可能的原因可能是环境变量LD_LIBRARY_PATH
。)
Check if it contains unwanted paths and clear it. (检查它是否包含不需要的路径并清除它。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…