rpm installation fails due to depencency /bin/sh not found

瘦欲@ 提交于 2019-12-05 14:49:52

问题


i am trying to install a package using rpm, for which i have created a different database using rpmdb --initdb --dbpath $HOME/myrpmdb and specifying that path in the --dbpath while insatlling. The error i am getting is

root@jason:su rpm --dbpath $HOME/myrpmdb -ivh XXX.rpm
error: Failed dependencies:
/bin/sh is needed by XXX

and /bin/sh exist Is there some way that i can specify this to the installer? Is there something i missed during the creation of different rpm database cause of which now it not able to fine the default commands?


回答1:


Right way install rpm via alien:

alien -i my_rpm_name.rpm

If alien is not installed:

sudo apt-get install alien



回答2:


error: Failed dependencies:
/bin/sh is needed by XXX

This happens because bash rpm is not available in the new rpmdb path. You would have to use following to get the rpm installed.

# rpm --dbpath $HOME/myrpmdb --nodeps -ivh XXX.rpm



回答3:


Because you've told it to use a completely different database, rpm doesn't look at the system database which is where /bin/sh would be found.




回答4:


Why use a different rpm database? There should be a really good reason to go this route...

If you must have a private rpm db, you can copy the system db into your private one cp /var/lib/rpm/* ~/myrpmdb/.

installing with --nodeps may be the easiest way... copying the rpm db is really sub-optimal, it will soon be out of date and not reflect the state of the system.



来源:https://stackoverflow.com/questions/3959040/rpm-installation-fails-due-to-depencency-bin-sh-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!