当我使用rpm在RHEL上安装rpm包时,我收到一条错误消息,就像“失败的依赖关系:xxx需要/ bin / sh”。
我检查了/ bin / sh是否在那里它链接到/ bin / bash并且bash效果很好。
我找到了一个解决方案,可以将--nodeps
添加到rpm命令来解决此问题。但我真的想知道根本原因是什么?
答案 0 :(得分:4)
如何在全新安装的Ubuntu 14.04上重现此错误。
sudo apt-get install rpm
chmod +x nomachine_4.2.25_1_x86_64.rpm
像这样提取它:
el@apollo:~Desktop$ sudo rpm -i nomachine_4.2.25_1_x86_64.rpm
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
error: Failed dependencies:
/bin/sh is needed by nomachine-4.2.25-1.x86_64
这就是错误。为了解决这个问题,我遵循了建议使用外星人。
sudo alien -i nomachine_4.2.25_1_x86_64.rpm --scripts
没有正确安装机器。
答案 1 :(得分:2)
我找到了这个问题的根本原因。我的机器上缺少rpm-libs。我重新安装rpm-libs然后一切正常。注意:安装rpm-libs后,如果问题仍然存在,请尝试“rpm -v --rebuilddb --define =”_ rpmlock_path / var / lock / rpm“”。
答案 2 :(得分:0)